HELP: fork1 failes and crashes machine

HELP: fork1 failes and crashes machine

Post by Surendar Chand » Mon, 28 Apr 1997 04:00:00



Hi,
 I am using fork1() on a Solaris-threaded program, that does a
 fork1() and call exec. It works 2 or 3 times, before the fork1
 fails and the following error message is posted on the terminal:

 _alloc_chunk(): _mmap failed: Operation not applicable
 libthread panic: _reaper_create: _alloc_thread returns 0! - no memory (PID: 19681 LWP 1)
 stacktrace:
         6fb384e0
         6fb3942c
         6fb3f59c
         1d7d8
         1bb60
         1bff0
         6fb42278
         1bba8

 pstack reports that the thread is waiting on

 6f9b6954 sigtimedwait (6ea090f4, 0, 0)
 6f9b6954 _libc_sigtimedwait (6ea090f4, 0, 0, 6fb5a7b0, 2, 6ea0be38) + 4
 6fb385d8 _panic   (0, 100000, 6ea0935c, 1, 6fb5ae20, 6ea09104) + 158
 6fb3942c _reaper_create (6ea0be4b, 0, 6ea0be46, 6ea0be47, 0, 6ea0be45) + 30
 6fb3f59c _ti_fork1 (6fb5ae20, 6fb56428, 6fb53180, 6fb5a770, 6fb53200, 0) + 118
 0001d7d8 cache_put (6ea0b2fc, 6ea0a248, c3ab8, 0, 0, 53657276) + c0
 0001bb60 call_cache_put (6ea0a3a4, 6ea0a248, c3ab8, 6ea0b2fc, 6ea0b2fc, 351) + 228
 0001cf00 process  (b9dd0, 0, 0, 0, 0, 0) + 1358
 6fb42278 _thread_start (b9dd0, 0, 0, 0, 0, 0) + c

 After a coupla times of this error, usually the machine crashes. I am running
 on Ultra1/Sparc 20 using SunOS 5.5.1 Generic_103640-03 sun4u sparc SUNW,Ultra-1.
 Could you please let me know what is happening? I would really appreciate your
 help on this.

 Thanks
 -S

 
 
 

HELP: fork1 failes and crashes machine

Post by Fletcher.Gl.. » Tue, 29 Apr 1997 04:00:00


Did you detach the thread that is doing the fork1()?  Since you're going
to exec, you don't want an attached thread to perform the exec.



Quote:>Hi,
> I am using fork1() on a Solaris-threaded program, that does a
> fork1() and call exec. It works 2 or 3 times, before the fork1
> fails and the following error message is posted on the terminal:

> _alloc_chunk(): _mmap failed: Operation not applicable
> libthread panic: _reaper_create: _alloc_thread returns 0! - no memory (PID: 19681 LWP 1)
> stacktrace:
>     6fb384e0
>     6fb3942c
>     6fb3f59c
>     1d7d8
>     1bb60
>     1bff0
>     6fb42278
>     1bba8

> pstack reports that the thread is waiting on

> 6f9b6954 sigtimedwait (6ea090f4, 0, 0)
> 6f9b6954 _libc_sigtimedwait (6ea090f4, 0, 0, 6fb5a7b0, 2, 6ea0be38) + 4
> 6fb385d8 _panic   (0, 100000, 6ea0935c, 1, 6fb5ae20, 6ea09104) + 158
> 6fb3942c _reaper_create (6ea0be4b, 0, 6ea0be46, 6ea0be47, 0, 6ea0be45) + 30
> 6fb3f59c _ti_fork1 (6fb5ae20, 6fb56428, 6fb53180, 6fb5a770, 6fb53200, 0) + 118
> 0001d7d8 cache_put (6ea0b2fc, 6ea0a248, c3ab8, 0, 0, 53657276) + c0
> 0001bb60 call_cache_put (6ea0a3a4, 6ea0a248, c3ab8, 6ea0b2fc, 6ea0b2fc, 351) + 228
> 0001cf00 process  (b9dd0, 0, 0, 0, 0, 0) + 1358
> 6fb42278 _thread_start (b9dd0, 0, 0, 0, 0, 0) + c

> After a coupla times of this error, usually the machine crashes. I am running
> on Ultra1/Sparc 20 using SunOS 5.5.1 Generic_103640-03 sun4u sparc SUNW,Ultra-1.
> Could you please let me know what is happening? I would really appreciate your
> help on this.

> Thanks
> -S