Bug 139806 - ia32el doesn't output elf32 core dump files.
ia32el doesn't output elf32 core dump files.
Status: CLOSED RAWHIDE
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:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-18 01:15 EST by L3support
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-14 06:28:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix for this issue (3.81 KB, patch)
2004-11-30 18:31 EST, Yoav Zach
no flags Details | Diff

  None (edit)
Description L3support 2004-11-18 01:15:32 EST
Description of problem:
ia32el doesn't output elf32 core dump files but elf64 core dump files. 

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
   # cat test-core.c
   #include <stdio.h>
   #include <stdlib.h>

   main()
   {
           printf("start\n");
           CBABRT();
           printf("ended\n");
   }

   CBABRT()
   {
           abort();
   }
   # cc -o test-core test-core.c

2. Copy the compiled application to RHEL4 for ia64
   
3. Run the applicaion on IA32EL
   # /etc/init.d/ia32el status
   Intel IA-32 Execution Layer in use
   # ulimit -c unlimited
   # file test-core
   test-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-core
   start
   Aborted (core dumped)

4. See the file type of the core dump file
   # file core.<pid>
   core.6420: ELF 64-bit LSB core file IA-64, version 1 (SYSV),
SVR4-style, SVR4-style, SVR4-style

Actual results:
   core.6420: ELF 64-bit LSB core file IA-64, version 1 (SYSV),
SVR4-style, SVR4-style, SVR4-style

Expected results:
core.6420: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
SVR4-style, SVR4-style, from 'test-core'

Additional info:
Comment 1 Jakub Jelinek 2004-11-18 05:02:45 EST
With ia32el the kernel doesn't really know at all that the emulator is
running 32-bit process.
I guess one option is let ia32el do the core dumping (intercept SIGABRT, SIGSEGV
etc. signals) in userland.
Comment 2 L3support 2004-11-18 19:00:19 EST
In case of SIGSEGV, ia32el can output 32bit core dump file. So it
seems that ia32el cannot properly handle some signals whose action is
'core'.

----
$ cat test-sigsegv.c
main()
{
    int *p, *q;
    p=0;
    *q=*p;
}
$ file test-sigsegv
test-sigsegv: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
not stripped
$ uname -a
Linux ipf11 2.6.9-1.648_EL #1 SMP Tue Oct 26 12:20:12 EDT 2004 ia64
ia64 ia64 GNU/Linux
$ /etc/init.d/ia32el status
Intel IA-32 Execution Layer in use
$ ./test-sigsegv
Segmentation fault
$ file core.7607
core.7607: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
SVR4-style, SVR4-style, from 'test-sigsegv'
-----------------------

Thanks,
Comment 3 Yoav Zach 2004-11-30 18:31:06 EST
Created attachment 107672 [details]
fix for this issue
Comment 4 Jakub Jelinek 2004-12-06 12:02:51 EST
Should be fixed in ia32el-1.1-12 in dist-4E-lacd, also put to ftp://people.redhat.com/jakub/ia32el/
Comment 5 Jay Turner 2005-01-14 06:28:56 EST
Fix confirmed with 1.1-20:

[root@tomservo tmp]# arch
ia64
[root@tomservo tmp]# file core.27830
core.27830: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style,
SVR4-style, from 'test-core'

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