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


You are not allowed to post comments on this tracker with your current authentication 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/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned 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 (3KiB - application/octet-stream)
file #27447:  GSAvahiNetServicesCrash.tar.gz added by znek (3KiB - application/x-gzip)


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-17 znek Attached File- => Added GSAvahiCleanup.diff, #27475
    2013-02-17 CaS StatusNone => Fixed
        Open/ClosedOpen => In Test
    2013-02-16 CaS StatusFixed => None
        Open/ClosedClosed => Open
    2013-02-16 CaS StatusNone => Fixed
        Open/ClosedOpen => Closed
    2013-02-12 znek Attached File- => Added GSAvahiNetServicesCrash.tar.gz, #27447

    Back to the top

    Powered by Savane 3.3