Bug 234989 - gcj seg faults on ia64 when aot compiling the jsch jar
gcj seg faults on ia64 when aot compiling the jsch jar
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-03 01:13 EDT by Ben Konrath
Modified: 2008-08-02 19:40 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 21:24:43 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)
Patch that appears to fix the bug (5.98 KB, patch)
2007-05-07 04:00 EDT, Alexandre Oliva
no flags Details | Diff
Fix a typo in the default definition of the new target hook (5.98 KB, patch)
2007-05-07 12:39 EDT, Alexandre Oliva
no flags Details | Diff

  None (edit)
Description Ben Konrath 2007-04-03 01:13:42 EDT
I'm not sure if this should be filed against the gcc package or java-1.5.0-gcj
so I just guessed. Feel free to move it if I was wrong.

Versions:

java-1.5.0-gcj-1.5.0.0-11.fc7
java-1.5.0-gcj-devel-1.5.0.0-11.fc7
gcc-java-4.1.2-7
jsch-0.1.28-1jpp.6

Problem:

GCJ seg faults when aot compiling the jsch jar on ia64. Here's the output:

+ aot-compile-rpm
/usr/bin/gcj -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -fPIC -findirect-dispatch -fjni
jsch-0.1.28.jar.1.jar -o jsch-0.1.28.jar.1.o
<unknown>: In class 'com.jcraft.jsch.KnownHosts':
<unknown>: In method
'com.jcraft.jsch.KnownHosts.setKnownHosts(java.io.InputStream)':
<unknown>:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [jsch-0.1.28.jar.1.o] Error 1
aot-compile-rpm: error: /usr/bin/make exited with code 2
error: Bad exit status from /var/tmp/rpm-tmp.43574 (%install)

I put the jsch jar here for convenience:

http://people.redhat.com/bkonrath/eclipse/jsch-20070403.jar

I'm going to disable the aot compilation of this jar on ia64 until this problem
is sorted out.
Comment 1 Jakub Jelinek 2007-04-03 03:00:20 EDT
Reproduceable with just KnownHosts.class:
usr/libexec/gcc/ia64-redhat-linux/4.1.2/jc1 KnownHosts.class
-fhash-synchronization -fuse-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase KnownHosts.class
-auxbase-strip jsch-20070403.jar.o -g -O2 -Wall -version -fexceptions
-fstack-protector -fPIC -findirect-dispatch -fjni
-fbootclasspath=jsch-20070403.jar:usr/share/java/libgcj-4.1.2.jar --param
ssp-buffer-size=4 -o x.s
GNU Java version 4.1.2 20070327 (Red Hat 4.1.2-7) (ia64-redhat-linux)
        compiled by GNU C version 4.1.2 20070327 (Red Hat 4.1.2-7).
GGC heuristics: --param ggc-min-expand=83 --param ggc-min-heapsize=100996
Class path starts here:
    ./
    jsch-20070403.jar/ (system) (zip)
    usr/share/java/libgcj-4.1.2.jar/ (system) (zip)
<unknown>: In class 'com.jcraft.jsch.KnownHosts':
<unknown>: In method
'com.jcraft.jsch.KnownHosts.setKnownHosts(java.io.InputStream)':
<unknown>:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Comment 2 Alexandre Oliva 2007-04-10 08:59:11 EDT
I see what the problem is, but I still don't have a solution.

Basically, config/ia64.c:ia64_add_bundle_selector_before() copies REG_EH_REGION
notes from instructions that end basic blocks to nops inserted with the basic
block number of other insns.  Then, when
sched-ebb.c:fix_basic_block_boundaries() scans the instruction stream looking
for instructions that ended their blocks, it finds multiple instructions with
the same block number for which control_flow_insn_p(insn) holds.  This breaks
add_missing_bbs(), that doesn't expect such duplicates.

I suppose a reasonable solution would be to assign these nops with REG_EH_REGION
different basic block numbers.
Comment 3 Alexandre Oliva 2007-05-07 04:00:27 EDT
Created attachment 154243 [details]
Patch that appears to fix the bug

This patch seems to fix the problem, by assigning the same basic block number
to nops as that of the previous insn, and arranging for only the last nop in a
sequence (consisting of a call and multiple nops, in the same basic block with
the same REG_EH_REGION note) to be regarded as a control_flow_insn_p().

Does this seem like a reasonable approach?  I haven't run it through
bootstrap/regtesting yet.
Comment 5 Alexandre Oliva 2007-05-07 12:39:01 EDT
Created attachment 154278 [details]
Fix a typo in the default definition of the new target hook

This patch passed bootstrap and regtesting on devel ia64.
Comment 6 Bug Zapper 2008-04-03 19:55:16 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 7 Andrew Overholt 2008-04-04 09:46:04 EDT
I have no ia64 box on which to test this, but would be happy to re-enable AOT
compilation of jsch on ia64 if this is fixed.
Comment 8 Bug Zapper 2008-05-06 21:24:41 EDT
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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