hercules-390 / hyperion

Hercules 390
Other
252 stars 68 forks source link

segmentation fault on bootstrap #31

Closed liviobait closed 9 years ago

liviobait commented 10 years ago

Hi I have segmentation fault on ipl the debian installation. ipl s390.ins (is the file for ipl installation) segfault. This is the trace. If you need other information, just ask. Tank you

(gdb) bt

0 0x00007ffff76bd822 in s390_load_main (fname=0x7ffffffeec00 "/root/diso/boot/linux_vm", startloc=, noisy=0)

at scedasd.c:290

1 0x00007ffff76be278 in s390_load_hmc (fname=0x7ffffffefc0b "vm", cpu=, clear=) at scedasd.c:214

2 0x00007ffff7810bdd in ipl_cmd2 (argc=, argv=0x7fffffff0e90, cmdline=, clr_prm=)

at hscpufun.c:457

3 0x00007ffff781a29b in CallHercCmd (argc=2, argv=0x7fffffff0e90, cmdline=0x610a10 "ipl /root/diso/d390.ins") at cmdtab.c:400

4 0x00007ffff781a343 in HercCmdLine (pszCmdLine=0x6119c0 "ipl") at cmdtab.c:456

5 0x00007ffff781be4c in panel_command_r (cmdline=) at cmdtab.c:854

6 0x00007ffff759ce97 in do_panel_command (cmd=) at panel.c:728

7 0x00007ffff75a0217 in panel_display_r () at panel.c:3123

8 0x00007ffff758bfc7 in impl (argc=, argv=) at impl.c:1136

9 0x0000000000400fd0 in main (ac=1, av=0x7fffffffe708) at bootstrap.c:36

liviobait commented 10 years ago

Sorry this is the correct trace

herc =====> ipl /root/diso/d390.ins Program received signal SIGSEGV, Segmentation fault. instcnt 0; mips 0.000; I/O 0 0x00007ffff76bd822 in s390_load_main (fname=0x7ffffffeec00 "/root/diso/boot/linux_vm", startloc=, noisy=0) at scedasd.c:290 290 STORAGE_KEY(pageaddr, &sysblk) |= STORKEY_REF|STORKEY_CHANGE; (gdb) bt

0 0x00007ffff76bd822 in s390_load_main (fname=0x7ffffffeec00 "/root/diso/boot/linux_vm", startloc=, noisy=0)

at scedasd.c:290

1 0x00007ffff76be278 in s390_load_hmc (fname=0x7ffffffefc0b "vm", cpu=, clear=) at scedasd.c:214

2 0x00007ffff7810bdd in ipl_cmd2 (argc=, argv=0x7fffffff0e90, cmdline=, clr_prm=)

at hscpufun.c:457

3 0x00007ffff781a29b in CallHercCmd (argc=2, argv=0x7fffffff0e90, cmdline=0x610190 "ipl /root/diso/d390.ins") at cmdtab.c:400

4 0x00007ffff781a343 in HercCmdLine (pszCmdLine=0x611a30 "ipl") at cmdtab.c:456

5 0x00007ffff781be4c in panel_command_r (cmdline=) at cmdtab.c:854

6 0x00007ffff759ce97 in do_panel_command (cmd=) at panel.c:728

7 0x00007ffff75a0217 in panel_display_r () at panel.c:3123

8 0x00007ffff758bfc7 in impl (argc=, argv=) at impl.c:1136

9 0x0000000000400fd0 in main (ac=1, av=0x7fffffffe708) at bootstrap.c:36

Fish-Git commented 10 years ago

It would help to know what exact version of Hyperion (which specific commit) you are reporting this error for. :)

Your stack trace does not provide enough information to allow me to state with any high degree of confidence whether or not the problem you are reporting is being caused by commit fb3c2d12fbf046ee1c18f36ec7aabe29a0521ba4 made on August 4, 2014 (which introduced a serious bug into scedasd.c), but I find it quite likely.

If it is, the bug in question was fixed by commit fcfa82a7100078af480e0006697b8dca33276e33 made a few days later on August 9, 2014, so until I learn otherwise I am going to go ahead and close this issue as having already been resolved.

If the version of Hyperion you are (were) using already included (includes) the previous mentioned commit however, then please let me know or simply re-open this GitHub issue and I'll try to look into your issue a little deeper.

Thank you for taking the time to report it and I apologize for having introduced the bug in the first place.

liviobait commented 10 years ago

Hi sorry for the delay (deserved holiday in progress). In the test i used the version of hercules hyperion master of 13 Aug. Yesterday i cloned and recompiled and i have a different segfault. On ipl the ins file, hercules hang for 1 minut and segfault. I compiled with debug option, if you indicate me what you need for debugging i send you all. Note: ipl a new installation fault, but ipl a dasd already installed (always debian) work correctly. In addittion too, is normal the console not recognize cd command?

Fish-Git commented 10 years ago

One thing we must know is the exact version of Hercules you are using. What does Hercules report when you enter the "version" Hercules command?

I'm mostly a Windows developer, so I do not know how to debug segfaults on Linux.

I'm guessing we probably need some type of "core" dump? Or maybe a more detailed stack trace? Maybe one of the other Hercules developers who knows Linux will help us?

Help!     :)

jphartmann commented 10 years ago

To debug Hercules on unix:

  1. Configure hercules with --enable-optimization='-O3 -g -march=k8' (64-bit). -g is the important item. Build/install.
  2. ulimit -c unlimited

When a core file is produced (where and under what name depends on the distribution of your unix) you inspect it with gdb. The subcommand "where" gets you a traceback.

Be warned that Hercules uses a multitude of threads.

On 09/01/2014 10:12 AM, Fish-Git wrote:

One thing we must know is the exact version of Hercules you are using. What does Hercules report when you enter the "version" Hercules command?

I'm mostly a Windows developer, so I do not know how to debug segfaults on Linux.

I'm guessing we probably need some type of "core" dump? Or maybe a more detailed stack trace? Maybe one of the other Hercules developers who knows Linux will help us?

Help!     :)


Reply to this email directly or view it on GitHub: https://github.com/hercules-390/hyperion/issues/31#issuecomment-54032478

Fish-Git commented 10 years ago

What does your /root/diso/d390.ins file look like? May we see your /root/diso/d390.ins file?

What MAINSIZE are you using in your Hercules configuration file?

liviobait commented 10 years ago

The d390.ins the installation file of debian boot/linux_vm 0x00000000 boot/root.off 0x0001040c boot/root.siz 0x00010414 boot/parmfile 0x00010480 boot/root.bin 0x00800000

MAINSIZE is 6144

I recompiled hercules with your option and modified ulimit with your indication. Same result this is the backtrace output of gdb (gdb) bt

0 0x00007fe19ff4eb7b in raise () from /lib/x86_64-linux-gnu/libpthread.so.0

1

2 0x00007fe1a0a1d832 in s390_load_main (fname=0x7fff4e42eb10 "/root/diso/boot/linux_vm", startloc=, noisy=0)

at scedasd.c:290

3 0x00007fe1a0a1e277 in s390_load_hmc (fname=0x7fff4e42fb1b "vm", cpu=, clear=) at scedasd.c:214

4 0x00007fe1a0b5e863 in ipl_cmd2 (argc=, argv=0x7fff4e430d80, cmdline=, clr_prm=)

at hscpufun.c:457

5 0x00007fe1a0b67fc6 in CallHercCmd (argc=2, argv=0x7fff4e430d80, cmdline=0xfa0e80 "ipl /root/diso/d390.ins") at cmdtab.c:400

6 0x00007fe1a0b68078 in HercCmdLine (pszCmdLine=0xf92140 "ipl") at cmdtab.c:456

7 0x00007fe1a0b69b1b in panel_command_r (cmdline=) at cmdtab.c:854

8 0x00007fe1a0908171 in do_panel_command (cmd=) at panel.c:728

9 0x00007fe1a090b71a in panel_display_r () at panel.c:3123

10 0x00007fe1a08f7039 in impl (argc=, argv=) at impl.c:1136

11 0x0000000000400f82 in main (ac=3, av=) at bootstrap.c:36

liviobait commented 10 years ago

Sorry: Hercules version 4.00

ghost commented 10 years ago

Hello liviobait!

I apologize for the delay.

Do you prefer to be called "liviobait"?

Or do you have a real name? :)

Thank you for the Debian "d390.ins" information. May I ask where you downloaded it from? I would like to try it for myself. I would like to try to reproduce your problem for myself. Where did you download your S/390 Debian from?

Also, I still need to know the EXCACT version of Hercules that you are using. Telling me "4.00" does not help me. I need to see the output of the Hercules "version" command:

HHC01413I Hercules version 4.00.0-git-8110-g53196bf
HHC01414I (c) Copyright 1999-2013 by Roger Bowler, Jan Jaeger, and others
HHC01415I Built on Aug 28 2014 at 13:36:30
HHC01416I Build information:
HHC01417I Windows MSVC AMD64 ** DEBUG ** host architecture build
HHC01417I Modes: S/370 ESA/390 z/Arch
HHC01417I Max CPU Engines: 32
HHC01417I Using   Fish threads Threading Model
HHC01417I Using   Error-Checking Mutex Locking Model
HHC01417I With    Syncio support
HHC01417I With    Shared Devices support
HHC01417I With    Dynamic loading support
HHC01417I Using   shared libraries
HHC01417I With    External GUI support
HHC01417I With    IPV6 support
HHC01417I With    HTTP Server support
HHC01417I With    sqrtl support
HHC01417I Without SIGABEND handler
HHC01417I With    CCKD BZIP2 support
HHC01417I With    HET BZIP2 support
HHC01417I With    ZLIB support
HHC01417I With    Regular Expressions support
HHC01417I With    Object REXX support
HHC01417I Without Regina REXX support
HHC01417I With    Automatic Operator support
HHC01417I Without National Language Support
HHC01417I Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8
HHC01417I Running on WIN7 Windows-6.1.7601. 7 Ultimate Edition 64-bit, Intel(R) x64 LP=4, Cores=4, CPUs=2

The above information is what I need to know!

It tells me the exact version you are using and what build options were used.

The first HHC01413I message is the most important.

It might also be helpful to see your complete Hercules configuration file too.

Knowing which nix distribution you are using (i.e. which nix you are running Hercules on) might also be helpful.

IN SUMMARY:

  1. Where did you download your S/390 Debian from?
  2. What does your Hercules "version" command report?
  3. (optional) May we see your Hercules configuration file?
  4. (optional) Which *nix distro are you running Hercules on?

Thank you!

Fish

liviobait commented 10 years ago

Hi Call me livio :) For debian: http://cdimage.debian.org/debian-cd/7.6.0/s390x/iso-cd/debian-7.6.0-s390x-netinst.iso For hercules simple i have 4.00 i cloned the git with git clone https://github.com/hercules-390/hyperion

HHC01413I Hercules version 4.00 HHC01414I (c) Copyright 1999-2013 by Roger Bowler, Jan Jaeger, and others HHC01415I Built on Sep 2 2014 at 12:47:39 HHC01416I Build information: HHC01417I _Nix x8664 * DEBUG ** host architecture build HHC01417I Modes: S/370 ESA/390 z/Arch HHC01417I Max CPU Engines: 8 HHC01417I Using setresuid() for setting privileges HHC01417I Using POSIX threads Threading Model HHC01417I Using Error-Checking Mutex Locking Model HHC01417I With Syncio support HHC01417I With Shared Devices support HHC01417I With Dynamic loading support HHC01417I Using shared libraries HHC01417I With External GUI support HHC01417I With IPV6 support HHC01417I With HTTP Server support HHC01417I HTTP document default root directory is /opt/hercules/ht/share/hercules HHC01417I With sqrtl support HHC01417I With SIGABEND handler HHC01417I With CCKD BZIP2 support HHC01417I With HET BZIP2 support HHC01417I With ZLIB support HHC01417I With Regular Expressions support HHC01417I Without Object REXX support HHC01417I Without Regina REXX support HHC01417I With Automatic Operator support HHC01417I Without National Language Support HHC01417I Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8 HHC01417I Running on eluerp Linux-3.8.0-44-generic. #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2, x86_64 MP=4 HHC01508I HDL: loadable module directory is /opt/hercules/ht/lib/hercules HHC00150I Crypto module loaded (c) Copyright 2003-2011 by Bernard van der Helm HHC00151I Activated facility: Message Security Assist HHC00151I Activated facility: Message Security Assist Extension 1, 2, 3 and 4 HHC00100I Thread id 7f7ed4134700, prio 15, name Processor CP00 started HHC00811I Processor CP00: architecture mode z/Arch HHC00136W Error in function setenv(): cannot set CUU: Not thread safe--setting disabled HHC02204I cpuserial set to 002623 HHC02204I cpumodel set to 2064 HHC02204I model set to hardware(EMULATOR) capacity(EMULATOR) perm() temp() HHC02204I plant set to ZZ HHC02204I manufacturer set to HRC HHC02204I lparname set to HERCULES HHC02204I cpuverid set to FD HHC17003I MAIN storage is 6G (mainsize); storage is not locked HHC17003I EXPANDED storage is 0 (xpndsize); storage is not locked HHC00100I Thread id 7f7ecffff700, prio -20, name Timer started HHC00100I Thread id 7f7ed4337700, prio 15, name Processor CP01 started HHC00811I Processor CP01: architecture mode z/Arch HHC00100I Thread id 7f7ed4236700, prio 15, name Processor CP02 started HHC00811I Processor CP02: architecture mode z/Arch HHC00100I Thread id 7f7d4fbfc700, prio 15, name Processor CP03 started HHC00811I Processor CP03: architecture mode z/Arch HHC00100I Thread id 7f7d4fafb700, prio 15, name Processor CP04 started HHC00811I Processor CP04: architecture mode z/Arch HHC00100I Thread id 7f7d4f9fa700, prio 15, name Processor CP05 started HHC00811I Processor CP05: architecture mode z/Arch HHC00100I Thread id 7f7d4f8f9700, prio 15, name Processor CP06 started HHC00811I Processor CP06: architecture mode z/Arch HHC00100I Thread id 7f7d4f7f8700, prio 15, name Processor CP07 started HHC00811I Processor CP07: architecture mode z/Arch HHC02204I numcpu set to 8 HHC02204I maxcpu set to 8 HHC02204I archmode set to z/Arch HHC02256W Command ALRF is deprecated, use archlvl enable|disable|query asn_lx_reuse instead HHC02204I ecpsvm set to disabled HHC02204I loadparm set to 0120.... HHC01474I Using internal codepage conversion table default HHC02256W Command httpport is deprecated, use http port nnnn [[noauth]|[auth user pass]] instead HHC02204I httpport set to port=8081 noauth HHC01807I HTTP server signaled to start HHC02256W Command httproot is deprecated, use http root pathname instead HHC01802I HTTP server using root directory /opt/hercules/ht/share/hercules/ HHC02204I httproot set to /opt/hercules/ht/share/hercules/ HHC01806W HTTP server is already started HHC02204I panrate set to FAST HHC02198I Device 0009 type 3215 subchannel 0:0000 attached HHC01200E 0:000C Card: error in function access(): No such file or directory HHC01463E 0:000C device initialization failed HHC02198I Device 000D type 3525 subchannel 0:0001 attached HHC02198I Device 000E type 1403 subchannel 0:0002 attached HHC00100I Thread id 7f7d4f6f7700, prio 4, name HTTP server started HHC01802I HTTP server using root directory /opt/hercules/ht/share/hercules/ HHC01803I HTTP server waiting for requests on port 8081 HHC02198I Device 001F type 3270 subchannel 0:0003 attached HHC00100I Thread id 7f7d4ebcf700, prio 4, name Console connection started HHC01024I Waiting for console connections on port 3270 HHC00414I 0:0120 CKD file disk/3390.LINUX.0120: cyls 10017 heads 15 tracks 150255 trklen 56832 HHC02198I Device 0120 type 3390 subchannel 0:0004 attached HHC00414I 0:0121 CKD file disk/3390.LINUX.0121: cyls 2226 heads 15 tracks 33390 trklen 56832 HHC02198I Device 0121 type 3390 subchannel 0:0005 attached HHC00414I 0:0122 CKD file disk/3390.LINUX.0122: cyls 2226 heads 15 tracks 33390 trklen 56832 HHC02198I Device 0122 type 3390 subchannel 0:0006 attached HHC02198I Device 0600 type 3088 subchannel 0:0007 attached HHC00901I 0:0600 CTCI: interface tun0, type TUN opened HHC00147I Executing hercifc to configure interface HHC00148I Closing 1024 files HHC00149I IFC_IOCtl called for SIOCSIFADDR on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFDSTADDR on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFNETMASK on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFMTU on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFFLAGS on FDs 16 17 HHC02198I Device 0601 type 3088 subchannel 0:0008 attached HHC00100I Thread id 7f7ed6e43700, prio 0, name Control panel started HHC02204I maxcpu set to 8 + HHC02204I archmode set to z/Arch HHC02256W Command ALRF is deprecated, use archlvl enable|disable|query asn_lx_reuse instead HHC02204I ecpsvm set to disabled HHC02204I loadparm set to 0120.... HHC01474I Using internal codepage conversion table default HHC02256W Command httpport is deprecated, use http port nnnn [[noauth]|[auth user pass]] instead HHC02204I httpport set to port=8081 noauth HHC01807I HTTP server signaled to start HHC02256W Command httproot is deprecated, use http root pathname instead HHC01802I HTTP server using root directory /opt/hercules/ht/share/hercules/ HHC02204I httproot set to /opt/hercules/ht/share/hercules/ HHC01806W HTTP server is already started HHC02204I panrate set to FAST HHC02198I Device 0009 type 3215 subchannel 0:0000 attached HHC01200E 0:000C Card: error in function access(): No such file or directory HHC01463E 0:000C device initialization failed HHC02198I Device 000D type 3525 subchannel 0:0001 attached HHC02198I Device 000E type 1403 subchannel 0:0002 attached HHC00100I Thread id 7f7d4f6f7700, prio 4, name HTTP server started HHC01802I HTTP server using root directory /opt/hercules/ht/share/hercules/ HHC01803I HTTP server waiting for requests on port 8081 HHC02198I Device 001F type 3270 subchannel 0:0003 attached HHC00100I Thread id 7f7d4ebcf700, prio 4, name Console connection started HHC01024I Waiting for console connections on port 3270 HHC00414I 0:0120 CKD file disk/3390.LINUX.0120: cyls 10017 heads 15 tracks 150255 trklen 56832 HHC02198I Device 0120 type 3390 subchannel 0:0004 attached HHC00414I 0:0121 CKD file disk/3390.LINUX.0121: cyls 2226 heads 15 tracks 33390 trklen 56832 HHC02198I Device 0121 type 3390 subchannel 0:0005 attached HHC00414I 0:0122 CKD file disk/3390.LINUX.0122: cyls 2226 heads 15 tracks 33390 trklen 56832 HHC02198I Device 0122 type 3390 subchannel 0:0006 attached HHC02198I Device 0600 type 3088 subchannel 0:0007 attached HHC00901I 0:0600 CTCI: interface tun0, type TUN opened HHC00147I Executing hercifc to configure interface HHC00148I Closing 1024 files HHC00149I IFC_IOCtl called for SIOCSIFADDR on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFDSTADDR on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFNETMASK on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFMTU on FDs 16 17 HHC00149I IFC_IOCtl called for SIOCSIFFLAGS on FDs 16 17 HHC02198I Device 0601 type 3088 subchannel 0:0008 attached HHC00100I Thread id 7f7ed6e43700, prio 0, name Control panel started


For config file

------------------------------------------------------------------------------

CPU Configuration

------------------------------------------------------------------------------

CPUSERIAL 002623 # CPU serial number CPUMODEL 2064 # CPU model number MODEL EMULATOR # STSI returned model PLANT ZZ # STSI returned plant MANUFACTURER HRC # STSI returned manufacturer LPARNAME HERCULES # DIAG 204 returned lparname CPUVERID FD # CPU Version Identification MAINSIZE 6144 # Main storage size in megabytes XPNDSIZE 0 # Expanded storage size in megabytes NUMCPU 8 # Number of CPUs MAXCPU 8 # Maximum number of CPUs ARCHLVL z/Arch # Architecture mode S/370, ESA/390 or z/Arch ECPSVM NO # VM Assist : NO or Level (20 recommended)

------------------------------------------------------------------------------

OS Tailoring

------------------------------------------------------------------------------

LOADPARM 0120.... # IPL parameter OSTAILOR LINUX # OS tailoring SYSEPOCH 1900 # Base year for initial TOD clock

TZOFFSET 0 # Using UTC (GMT)

------------------------------------------------------------------------------

Hercules Service Processor and Hercules Application Window

------------------------------------------------------------------------------

CODEPAGE default # CodePage conversion table DIAG8CMD disable # OS may not issue commands via DIAG 8

HTTPPORT 8081 noauth #userid password # HTTP server port HTTPROOT /opt/hercules/ht/share/hercules/ # HTTP root directory

PANRATE FAST # Panel refresh rate

-------------------------------------------------------------------------------

Integrated Hercules I/O Controller

#

DEVTMAX 0 # Device threads, 8 on Windows, else unlimited

CNSLPORT 3270 # TCP port number to which consoles connect

SHRDPORT 3990 # TCP port number for sharing DASD images on

                            # this instance of Hercules (inactive)

.-----------------------Device number

| .-----------------Device type

| | .---------File name and parameters

| | |

V V V

---- ---- --------------------

0009 3215-C / noprompt 000C 3505 ./util/zzsacard.bin 000D 3525 punch00d.txt ascii 000E 1403 print00e.txt crlf 001F 3270 0120 3390 disk/3390.LINUX.0120 0121 3390 disk/3390.LINUX.0121 0122 3390 disk/3390.LINUX.0122 0600.2 3088 CTCI /dev/net/tun 1492 192.168.1.89 192.168.1.90 255.255.255.0


For system running hercules: ubuntu precise pangolin 64bit with kernel 3.8.0-44-generic #66~precise1-Ubuntu

Tank yuo!

ghost commented 10 years ago

Thank you.

I have downloaded it

I will try it and then get back to you.

(am very busy with other things too!)

Fish-Git commented 9 years ago

Resolved by commit# ed1ff43b98bcb64796e92fcaa02c6a0b8afced14

Issued closed.

"Fish" (David B. Trout) Software Development Laboratories http://www.softdevlabs.com (TEMP): david.b.trout@gmail.com