bugGNUstep - Bugs: bug #38310, GSAvahiNetServices crashes when...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #38310: GSAvahiNetServices crashes when removing a service

Submitted by:  Marcus Müller <znek>
Submitted on:  Tue 12 Feb 2013 12:24:13 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: In Test

Sun 17 Feb 2013 12:27:52 PM UTC, comment #5:

Excellent, that seems to have fixed it (I also tested with a different, slightly more complex project).

I've attached another diff for cleaning up minor issues left (obsolete code remnants, simplification, formal protocol support when compiling with clang).

(file #27475)

Marcus Müller <znek>
Project Member
Sun 17 Feb 2013 06:24:57 AM UTC, comment #4:

Spent a lot more time looking at this, and I think I fixed it by removing a couple of lines of code (but I don't know what those lines were intended to do)
Please try it out (see the change to Source/GSAvahiRunLoopIntegration.m)

Richard Frith-Macdonald <CaS>
Project Member
Sat 16 Feb 2013 11:13:11 AM UTC, comment #3:

Sorry ... it worked a few times for me ... but as you say, on repeated tests it doesn't.

Richard Frith-Macdonald <CaS>
Project Member
Sat 16 Feb 2013 10:30:33 AM UTC, comment #2:

(I cannot re-open the bug with the Savannah web frontend it seems.)

However, the bug remains reproducible even after r36152.

Marcus Müller <znek>
Project Member
Sat 16 Feb 2013 08:18:31 AM UTC, comment #1:

Thanks for that excellent demonstration code.
The problem was that the client object was not remogving its run-loop watcher from the run loop before deallocating it (so an incoming end of file event was sent to a deallocated watcher).
I changed the code to remove it from the loop on dealloc, which seems to fix it.

Richard Frith-Macdonald <CaS>
Project Member
Tue 12 Feb 2013 12:24:13 AM UTC, original submission:

The current implementation of GSAvahNetServices always crashes when a service is removed. I've attached a very simple demo program that reliably reproduces the crash, including instructions.

Marcus Müller <znek>
Project Member

 

Attached Files
file #27475:  GSAvahiCleanup.diff added by znek (3kB - application/octet-stream)
file #27447:  GSAvahiNetServicesCrash.tar.gz added by znek (3kB - application/x-gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by znek (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 17 Feb 2013 12:27:52 PM UTCznekAttached File-=>Added GSAvahiCleanup.diff, #27475
    Sun 17 Feb 2013 06:24:57 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>In Test
    Sat 16 Feb 2013 11:13:11 AM UTCCaSStatusFixed=>None
      Open/ClosedClosed=>Open
    Sat 16 Feb 2013 08:18:31 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 12 Feb 2013 12:24:13 AM UTCznekAttached File-=>Added GSAvahiNetServicesCrash.tar.gz, #27447

    Back to the top


    Powered by Savane 3.1-cleanup