bugGNUstep - Bugs: bug #20451, uncontrolled thread creation /...

Group
 
 

bug #20451: uncontrolled thread creation / crash

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Wed 11 Jul 2007 09:02:49 PM UTC
   
 
Category:  Application Severity:  3 - Normal
Item Group:  Bug Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 12 Jul 2012 08:34:36 AM UTC, comment #5: 

The problem was fixed by making the DNS resolver thread-safe in the GNUMail repository maintained on savannah.

Riccardo Mottola <rmottola>
Group Member
Wed 03 Oct 2007 08:46:27 AM UTC, comment #4: 

For what it's worth ... I built GNUMail with an observer to report NSWillBecomeMultithreadedNotification and it was never called during a few simple tests (sending and receiving a few emails).

Richard Frith-Macdonald <CaS>
Group Member
Wed 03 Oct 2007 06:23:07 AM UTC, comment #3: 

On further checking ... the problem is actually in the Pantomime framework ... not GNUmail, but I'm not sure how that would be categorised if not under 'Applications'.
Pantomime is not a GNU framework ... so perhaps this bug should be declined?

Richard Frith-Macdonald <CaS>
Group Member
Wed 03 Oct 2007 04:53:42 AM UTC, comment #2: 

Reassigned category to 'application' for two reasons ...

1. the application probably should not be assuming that frameworks it links with don't use threads.  While GNUstep tries to refrain from using threads, the MacOS frameworks use them extensively, so it seems unreasonable for apps to assume they aren't being used

2. the problem can't be directly with the base library anyway ... since it doesn't use threads (unlessthe application asks it to).
Possibly the gui or the backend starts a thread (and I don't think they really ought to, because that's one advantage GNUstep has over the Apple frameworks), but even if they do, I think the application probably should work around the NetBSD problem.

It seems to me that this is a portability issue in the application code (it's using _res directly itsself).

Richard Frith-Macdonald <CaS>
Group Member
Tue 02 Oct 2007 10:08:29 PM UTC, comment #1: 

Assigned category "Base", which may be completely wrong, but better than no category.

Fred Kiefer <FredKiefer>
Group Member
Wed 11 Jul 2007 09:02:49 PM UTC, original submission:  

On NetBSD GNUmail crashes with the following message:

_res is not supported for multi-threaded programs.

now I asked Ludovic explicitely and he said:

GNUMail (nor Pantomime) does NOT create any thread so that has to
come from GNUstep (the thread creation)...

but somehow more than une thread must be running... (GNUMail exposes this problem since other programs probably don't query DNSs that way).

when inside GDB i can effectively switch among "t 1" and "t 2" ! I get two identical stactraces though. The only difference I can see is that GDB class one LWP 1 and the other Thread 1.



[Switching to thread 1 (LWP 1)]#0 0xbd1c20fb in kill ()
from /usr/lib/libc.so.12
(gdb) bt
#0 0xbd1c20fb in kill () from /usr/lib/libc.so.12
#1 0xbd24317f in abort () from /usr/lib/libc.so.12
#2 0xbd2a4720 in __res_state () from /usr/lib/libpthread.so.0
#3 0xbda1e679 in _i_CWDNSManager_Private__parseResolvFile (self=0x847acc8,
_cmd=0xbda85c10) at CWDNSManager.m:435
#4 0xbda1da1a in _i_CWDNSManager__init (self=0x847acc8, _cmd=0xbda85be0)
at CWDNSManager.m:157
#5 0xbda1e22c in _c_CWDNSManager__singleInstance (self=0xbda85ac0,
_cmd=0xbda98360) at CWDNSManager.m:360
#6 0xbda667ae in i_CWTCPConnection__initWithName_port_connectionTimeout_readTimeout_writeTimeout_background (self=0x847ac08, _cmd=0xbda98320,
theName=0x817be88, thePort=110, theConnectionTimeout=60,
theReadTimeout=60, theWriteTimeout=60, theBOOL=1 '\001')
at CWTCPConnection.m:189
#7 0xbda66374 in i_CWTCPConnection__initWithName_port_background (
self=0x847ac08, _cmd=0xbda96cd8, theName=0x817be88, thePort=110,
theBOOL=1 '\001') at CWTCPConnection.m:87
#8 0xbda5e1ef in _i_CWService__connectInBackgroundAndNotify (self=0x8198a88,
_cmd=0xbdbe6f60) at CWService.m:431
#9 0xbdb70b01 in i_TaskManager_Private__receiveUsingPOP3ForTask (
self=0x84f3b48, _cmd=0xbdbe6940, theTask=0x8198a08) at TaskManager.m:2329
#10 0xbdb6547d in _i_TaskManager__nextTask (self=0x84f3b48, _cmd=0xbdbe68e8)
at TaskManager.m:272
#11 0xbdb64fb2 in i_TaskManager__addTask (self=0x84f3b48, _cmd=0xbdbe7038,
theTask=0x8198a08) at TaskManager.m:185
#12 0xbdb72c8c in i_TaskManager_Private__checkMailForAccount_origin_owner (
self=0x84f3b48, _cmd=0xbdbe69f8, theAccountName=0x8189dc8, theOrigin=1,
theOwner=0x85e1808) at TaskManager.m:2637
#13 0xbdb66099 in i_TaskManager__checkForNewMail_controller (self=0x84f3b48,
_cmd=0xbdbdb678, theSender=0x8608288, theMailWindowController=0x85e1808)
at TaskManager.m:472
#14 0xbdb46aea in i_MailWindowController__getNewMessages (self=0x85e1808,
_cmd=0xbdbdc840, sender=0x8608288) at MailWindowController.m:2434
#15 0xbced567f in L10 () from /usr/pkg/lib/libavcall.so.0
#16 0xbd48d74f in GSFFCallInvokeWithTargetAndImp (_inv=0x82ac548,
anObject=0x85e1808,
imp=0xbdb46a7c <_i_MailWindowController__getNewMessages_>)
at GSFFCallInvocation.m:708
#17 0xbd48dac1 in i_GSFFCallInvocation__invokeWithTarget (self=0x82ac548,
_cmd=0xbd950cc8, anObject=0x85e1808) at GSFFCallInvocation.m:778
#18 0xbd6df332 in i_NSApplication__sendAction_to_from (self=0x8176008,
_cmd=0xbd98a140, aSelector=0xbdbdc840, aTarget=0x85e1808, sender=0x8608288)
at NSApplication.m:1986
#19 0xbd815673 in i_GSToolbarButton__sendAction_to (self=0x8606c08,
_cmd=0xbd9588e0, action=0x0, target=0x85e1808) at NSToolbarItem.m:368
#20 0xbd71274b in i_NSCell__trackMouse_inRect_ofView_untilMouseUp (
self=0x8606d08, _cmd=0xbd95f350, theEvent=0x8198d88, cellFrame=
{origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
controlView=0x8606c08, flag=0 '\0') at NSCell.m:1699
#21 0xbd736b47 in i_NSControl__mouseDown (self=0x8606c08, _cmd=0xbd98a110,
theEvent=0x8255508) at NSControl.m:849
#22 0xbd815431 in i_GSToolbarButton__mouseDown (self=0x8606c08,
_cmd=0xbd98e388, event=0x8255508) at NSToolbarItem.m:327
#23 0xbd835351 in i_NSWindow__sendEvent (self=0x85cea08, _cmd=0xbd950c68,
theEvent=0x8255508) at NSWindow.m:3267
#24 0xbd6dedb9 in i_NSApplication__sendEvent (self=0x8176008,
_cmd=0xbd950ba0, theEvent=0x8255508) at NSApplication.m:1867
#25 0xbd6dda04 in _i_NSApplication__run (self=0x8176008, _cmd=0xbd94b6c8)
at NSApplication.m:1369
#26 0xbd6c2ef7 in NSApplicationMain (argc=1, argv=0xbfbfd99c) at Functions.m:72
#27 0x08048bb6 in gnustep_base_user_main (argc=1, argv=0xbfbfd99c,
env=0xbfbfd9a4) at GNUMail_main.m:42
#28 0xbd41209b in main (argc=1, argv=0xbfbfd99c, env=0xbfbfd9a4)
at NSProcessInfo.m:897
#29 0x08048876 in ___start ()

and

[Switching to thread 2 (Thread 1 ())]#0 0xbd1c20fb in kill ()
from /usr/lib/libc.so.12
(gdb) bt
#0 0xbd1c20fb in kill () from /usr/lib/libc.so.12
#1 0xbd24317f in abort () from /usr/lib/libc.so.12
#2 0xbd2a4720 in __res_state () from /usr/lib/libpthread.so.0
#3 0xbda1e679 in _i_CWDNSManager_Private__parseResolvFile (self=0x847acc8,
_cmd=0xbda85c10) at CWDNSManager.m:435
#4 0xbda1da1a in _i_CWDNSManager__init (self=0x847acc8, _cmd=0xbda85be0)
at CWDNSManager.m:157
#5 0xbda1e22c in _c_CWDNSManager__singleInstance (self=0xbda85ac0,
_cmd=0xbda98360) at CWDNSManager.m:360
#6 0xbda667ae in i_CWTCPConnection__initWithName_port_connectionTimeout_readTimeout_writeTimeout_background (self=0x847ac08, _cmd=0xbda98320,
theName=0x817be88, thePort=110, theConnectionTimeout=60,
theReadTimeout=60, theWriteTimeout=60, theBOOL=1 '\001')
at CWTCPConnection.m:189
#7 0xbda66374 in i_CWTCPConnection__initWithName_port_background (
self=0x847ac08, _cmd=0xbda96cd8, theName=0x817be88, thePort=110,
theBOOL=1 '\001') at CWTCPConnection.m:87
#8 0xbda5e1ef in _i_CWService__connectInBackgroundAndNotify (self=0x8198a88,
_cmd=0xbdbe6f60) at CWService.m:431
#9 0xbdb70b01 in i_TaskManager_Private__receiveUsingPOP3ForTask (
self=0x84f3b48, _cmd=0xbdbe6940, theTask=0x8198a08) at TaskManager.m:2329
#10 0xbdb6547d in _i_TaskManager__nextTask (self=0x84f3b48, _cmd=0xbdbe68e8)
at TaskManager.m:272
#11 0xbdb64fb2 in i_TaskManager__addTask (self=0x84f3b48, _cmd=0xbdbe7038,
theTask=0x8198a08) at TaskManager.m:185
#12 0xbdb72c8c in i_TaskManager_Private__checkMailForAccount_origin_owner (
self=0x84f3b48, _cmd=0xbdbe69f8, theAccountName=0x8189dc8, theOrigin=1,
theOwner=0x85e1808) at TaskManager.m:2637
#13 0xbdb66099 in i_TaskManager__checkForNewMail_controller (self=0x84f3b48,
_cmd=0xbdbdb678, theSender=0x8608288, theMailWindowController=0x85e1808)
at TaskManager.m:472
#14 0xbdb46aea in i_MailWindowController__getNewMessages (self=0x85e1808,
_cmd=0xbdbdc840, sender=0x8608288) at MailWindowController.m:2434
#15 0xbced567f in L10 () from /usr/pkg/lib/libavcall.so.0
#16 0xbd48d74f in GSFFCallInvokeWithTargetAndImp (_inv=0x82ac548,
anObject=0x85e1808,
imp=0xbdb46a7c <_i_MailWindowController__getNewMessages_>)
at GSFFCallInvocation.m:708
#17 0xbd48dac1 in i_GSFFCallInvocation__invokeWithTarget (self=0x82ac548,
_cmd=0xbd950cc8, anObject=0x85e1808) at GSFFCallInvocation.m:778
#18 0xbd6df332 in i_NSApplication__sendAction_to_from (self=0x8176008,
_cmd=0xbd98a140, aSelector=0xbdbdc840, aTarget=0x85e1808, sender=0x8608288)
at NSApplication.m:1986
#19 0xbd815673 in i_GSToolbarButton__sendAction_to (self=0x8606c08,
_cmd=0xbd9588e0, action=0x0, target=0x85e1808) at NSToolbarItem.m:368
#20 0xbd71274b in i_NSCell__trackMouse_inRect_ofView_untilMouseUp (
self=0x8606d08, _cmd=0xbd95f350, theEvent=0x8198d88, cellFrame=
{origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
controlView=0x8606c08, flag=0 '\0') at NSCell.m:1699
#21 0xbd736b47 in i_NSControl__mouseDown (self=0x8606c08, _cmd=0xbd98a110,
theEvent=0x8255508) at NSControl.m:849
#22 0xbd815431 in i_GSToolbarButton__mouseDown (self=0x8606c08,
_cmd=0xbd98e388, event=0x8255508) at NSToolbarItem.m:327
#23 0xbd835351 in i_NSWindow__sendEvent (self=0x85cea08, _cmd=0xbd950c68,
theEvent=0x8255508) at NSWindow.m:3267
#24 0xbd6dedb9 in i_NSApplication__sendEvent (self=0x8176008,
_cmd=0xbd950ba0, theEvent=0x8255508) at NSApplication.m:1867
#25 0xbd6dda04 in _i_NSApplication__run (self=0x8176008, _cmd=0xbd94b6c8)
at NSApplication.m:1369
#26 0xbd6c2ef7 in NSApplicationMain (argc=1, argv=0xbfbfd99c) at Functions.m:72
#27 0x08048bb6 in gnustep_base_user_main (argc=1, argv=0xbfbfd99c,
env=0xbfbfd9a4) at GNUMail_main.m:42
#28 0xbd41209b in main (argc=1, argv=0xbfbfd99c, env=0xbfbfd9a4)
at NSProcessInfo.m:897
#29 0x08048876 in ___start ()

Riccardo Mottola <rmottola>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 FredKiefer (Posted a comment)
  • -email is unavailable- added by rmottola (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-18 rmottola Open/ClosedOpen Closed
    2012-07-12 rmottola StatusNone Invalid
    2007-10-03 CaS CategoryBase/Foundation Application
    2007-10-02 FredKiefer CategoryNone Base/Foundation

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code