Bug 39802 - iBCS2 emulation fork process core dumps
Summary: iBCS2 emulation fork process core dumps
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: i386 (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
: 11165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-24 21:20 UTC by Greg Quinlan
Modified: 2017-06-29 00:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Quinlan 2002-06-24 21:20:04 UTC
Using iBCS2 emulation ONLY with IBCS2 Binaries ONLY;
Any iBCS2 (COFF/SCO) binary which forks a process (child process) will get the next
PID (ranging from X to 99999, see /sys/sys/proc.h), but most iBCS2 binaries
have an upper PID limit of around 32700 (short int). So after the PID count exceeds this
value, the program will crash (core dump). It may give an error of 'can't fork process' or similar.

Fix: 

- Modify the /sys/sys/proc.h
change PID_MAX from 99999 to a safe value of 32759, and 
also change NO_PID from 100000 to a safe value of 32760.
- Remake the kernel & reboot.

This should be included as a WARNING in the documentation for IBCS2 emulation.
Or modified automatically if the option for iBCS2 is included in the /etc/rc.conf file.
How-To-Repeat: The problem will not reproduce itself until the current PID reaches around 32700
which may not happen for some time after a boot or reboot.

Wait for the PID number to exceed 'short int', and for an iBCS2 program to fork
a child process.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-09-03 03:25:47 UTC
State Changed
From-To: open->feedback

Is this still a problem with modern versions of FreeBSD? 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-09-03 03:25:47 UTC
Responsible Changed
From-To: freebsd-bugs->emulation

This looks like an error in the emulation code.
Comment 3 Tim Robbins freebsd_committer freebsd_triage 2004-09-03 07:11:29 UTC
State Changed
From-To: feedback->closed

Duplicate of i386/11165.
Comment 4 Josh Paetzel freebsd_committer freebsd_triage 2017-06-29 00:59:51 UTC
*** Bug 11165 has been marked as a duplicate of this bug. ***