Bug 139815 - 32bit application on IA32EL hungups while core dumping.
32bit application on IA32EL hungups while core dumping.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ia32el (Show other bugs)
4.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On: 143073
Blocks: 137160 145334
  Show dependency treegraph
 
Reported: 2004-11-18 02:36 EST by L3support
Modified: 2007-11-30 17:07 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 15:41:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
a patch to fix the problem (9.82 KB, patch)
2004-12-05 23:54 EST, Yoav Zach
no flags Details | Diff

  None (edit)
Description L3support 2004-11-18 02:36:28 EST
Description of problem:
A 32bit multi-threads application on IA32LE hungups while its core
dump file is being output.

Version-Release number of selected component (if applicable):
ia32el-1.1-8

How reproducible:
always

Steps to Reproduce:
1. Compile the following source on RHEL4 for i386
   # cc test-thread-core.c -o test-thread-core -lpthread -D_REENTRANT
   ------< source >-----------------
   // test-thread-core.c
   #include <stdio.h>
   #include <pthread.h>
   
   pthread_t tids[10];
   
   void *__func(void *param)
   {
       int *p, *q;
       printf("Thread %d is started.\n", pthread_self());
       sleep (5);
       p=0;
       *q=*p;
       return;
   }
   
   main()
   {
       int i=0, ret;
   
       for (i = 0; i < 5; i++)
       {
           ret = pthread_create(&tids[i], NULL, __func, NULL);
           if (ret != 0) {
               perror("Thread creation failed");
               exit(1);
           }
       }
       for (i = 0; i < 5; i++)
       {
           ret = pthread_join(tids[i], NULL);
       }
       return;
   }
   ------< source >-----------------
   
2. Copy the compiled 32bit application to RHEL4 for ia64

3. Run the application on IA32EL
   # /etc/init.d/ia32el status
   # ulimit -c unlimited
   # file test-thread-core
   # ./test-thread-core

Actual results:
   # /etc/init.d/ia32el status
   Intel IA-32 Execution Layer in use
   # ulimit -c unlimited
   # file test-thread-core
   test-thread-core: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
not stripped
   # ./test-thread-core
   Thread 1085852592 is started.
   Thread 1096354736 is started.
   Thread 1106856880 is started.
   Thread 1117359024 is started.
   Thread 1127861168 is started.
     < seem to hungup >

Expected results:
   # ./test-thread-core
   Thread 1085852592 is started.
   Thread 1096354736 is started.
   Thread 1106856880 is started.
   Thread 1117359024 is started.
   Thread 1127861168 is started.
   Segmentation fault (core dumped)

Additional info:
Comment 1 Yoav Zach 2004-11-25 03:42:42 EST
Jakub, will it be possible for you to add me to CC list for every 
issue opened for ia32el ?

Thanks,
Yoav.
Comment 2 Yoav Zach 2004-11-30 18:54:47 EST
this problem will be fixed with version 88.34.22, which is currently 
under validation. should be ready early next week.
Comment 3 Yoav Zach 2004-12-05 23:54:33 EST
Created attachment 107923 [details]
a patch to fix the problem
Comment 4 Jakub Jelinek 2004-12-06 12:03:44 EST
Should be fixed in ia32el-1.1-12 in dist-4E-lacd, also put to ftp://people.redhat.com/jakub/ia32el/
Comment 5 L3support 2004-12-09 06:56:45 EST
I tried ia32el-1.1-12. It doesn't work well. 
This ia32el outputs the elf32 core dump file of a 32bit multi-threads
process but the process doesn't finish. ps(1) shows that its status is
'T(stopped)'. 
--------
# uname -a
Linux plat-tiger4b 2.6.9-1.648_EL #1 SMP Tue Oct 26 12:20:12 EDT 2004
ia64 ia64 ia64 GNU/Linux
# 
# ulimit -c unlimited
# 
# file test-thread-ia32-core 
test-thread-ia32-core: ELF 32-bit LSB executable, Intel 80386, version
1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
not stripped
# 
# ./test-thread-ia32-core &
[1] 3709
# func_001 started.
thread create.
thread create.
thread create.
thread create.
thread create.
Thread 1085836208 is started.
Thread 1106840496 is started.
Thread 1096338352 is started.
Thread 1117342640 is started.
Thread 1127844784 is started.

# 
# ls -l core*
-rw-------  1 root root 52768768 Dec  9 20:25 core.3709
# 
# file core.3709 
core.3709: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
SVR4-style, SVR4-style, from 'test-thread-ia32'
#
# ps aux | grep test-thread-ia32-core | grep -v grep
root      3709  0.0  0.1 90080 6240 pts/1    Tl   20:25   0:00
./test-thread-ia32-core                                              
     
#
-------------------------

Thanks,
Comment 6 Yoav Zach 2004-12-13 03:40:15 EST
We could not reproduce the failure. 
On which OS version did your run the test ? Was it pre RC1 ? 
Also - is it the same test that was used in the first report ? If 
not - can we have the sources of the new test ?
Thanks,
Yoav.
Comment 7 L3support 2004-12-13 05:59:15 EST
> On which OS version did your run the test ? Was it pre RC1 ?

Yes, OS version is RHEL4 pre RC1 and I use the same test program.
But I compile the test program on RHEL4 beta1 for i386 or RHEL3 U3 for
i386. Is it a problem? 

----<ia64 environment>------------------------
# uname -a
Linux plat-tiger4b 2.6.9-1.849_EL #1 SMP Wed Dec 1 02:11:41 EST 2004
ia64 ia64 ia64 GNU/Linux
# rpm -q ia32el
ia32el-1.1-12
---------------------------------------

Thanks,
Comment 8 Yoav Zach 2004-12-16 06:48:10 EST
the root cause of this problem is that traced threads cannot be killed. we 
opened a bugzilla for that - #143073, and marked it as a dependency.

thanks,
yoav.
Comment 9 Jay Turner 2005-01-14 07:12:37 EST
I'm taking this out of Modified, as it still appears to be an issue and the
dependency isn't resolved either.
Comment 10 RHEL4-L3support 2005-01-18 20:48:55 EST
Add RHEL4-L3support team in Japan
Comment 11 JoAnne K. Halligan 2005-02-21 19:41:33 EST
Can we get a status update on this issue? Fujitsu is requesting a fix for this
and the associated blocker bz 143073.   

Fujitsu team: please be sure to open an Issue tracker noting this BZ and the
problem. That is now the process to use to track these items. 
Comment 12 L3support 2005-02-24 02:37:41 EST
Refer to Issue 66086. 
Comment 13 Jay Turner 2005-04-18 07:42:42 EDT
No longer seeing issues with ia32el-1.2-3.ia64 and kernel-2.6.9-6.37.EL.  Moving
to PROD_READY.

Note You need to log in before you can comment on or make changes to this bug.