Ravenports / ravenadm

Administration tool for Ravenports
http://www.ravenports.com
ISC License
18 stars 3 forks source link

ravenadm crashes with an illegal hardware instruction error #7

Closed ftigeot closed 4 years ago

ftigeot commented 6 years ago

While trying to test a new package: # /raven/bin/ravenadm test logstash6

[1] 573826 illegal hardware instruction (core dumped) /raven/bin/ravenadm test logstash6

It seems this runtime error is related to the content of the manifests/plist.single file, which currently contains 1028980 bytes.

jrmarino commented 6 years ago

i don't think the size is a problem. There should be several package lists bigger than that. I can't diagnose further. I'd need to source files to try to replicate.

ftigeot commented 6 years ago

I have put a tarball of the work-in-progress port on http://dl.wolfpond.org/ravenports_logstash6.tar.gz .

ftigeot commented 6 years ago

On my system, removing the share/logstash/vendor/jruby/lib/ruby/stdlib/rexml/attlistdecl.rb line from the plist.single file allows the port to build.

jrmarino commented 6 years ago

how did you determine this was the culprit? on the surface, there's nothing wrong with that filename ...

ftigeot commented 6 years ago

I don't think there's anything wrong with this particular filename per se. Its possible removing other lines will also stop ravenadm from crashing. This absence or presence of this line is just the shortest difference I found between a crashing ravenadm run or a successful one.

ftigeot commented 6 years ago

I forgot to say the platform I'm testing on is DragonFly/x86_64. The issue also seems to be libelf/pthread related. Backtrace from my core dump:

Core was generated by  'ravenadm'.
Program terminated with signal 4, Illegal instruction.
#0  0x0000000800af0b4b in ?? () from /libexec/ld-elf.so.2
(gdb) bt
#0  0x0000000800af0b4b in ?? () from /libexec/ld-elf.so.2
#1  0x0000000800aecd62 in __tls_get_addr () from /libexec/ld-elf.so.2
#2  0x00000008011d747a in .cerror () from /lib/libc.so.8
#3  0x0000000000000002 in ?? ()
#4  0x0000000801197d04 in realpath () from /lib/libc.so.8
#5  0x00000000007e6169 in __gnat_full_name (
    nam=nam@entry=0x7ffffe5f7150 "/usr/obj/ravenports/SL01/port/manifests/plist.single["00"]", 
    buffer=buffer@entry=0x7ffffe5f6d40 "/usr/obj/ravenports/SL01/port/manifests/plist.single["00"]") at cstreams.c:199
#6  0x00000000007d1fb6 in system__file_io__open () at s-fileio.adb:987
#7  0x00000000007d01ca in system.direct_io.create (file=<optimized out>, mode=<optimized out>, name=..., form=...)
    at s-direio.adb:113
#8  0x0000000000413079 in file_operations.dump_contents_to_file.file_string_io.create (file=0x0, mode=out_file, name=..., 
    form=...) at /raven/toolchain/gcc8/lib/gcc/x86_64-raven-dragonfly5.0/8.2.0/adainclude/a-direio.adb:86
#9  0x0000000000412e83 in file_operations.dump_contents_to_file (contents=..., dossier=...)
    at /construction/ravenadm/ravenadm-1.08/src/file_operations.adb:77
#10 0x000000000044e25d in package_manifests.decompress_manifest (compressed_string=..., save_to_file=...)
    at /construction/ravenadm/ravenadm-1.08/src/package_manifests.adb:319
#11 0x00000000006c11b5 in specification_parser.parse_specification_file (dossier=..., specification=..., 
    opsys_focus=dragonfly, arch_focus=x86_64, stop_at_targets=false, extraction_dir=..., success=false)
    at /construction/ravenadm/ravenadm-1.08/src/specification_parser.adb:651
#12 0x0000000000720a55 in portscan.operations.parse_and_transform_buildsheet (buildsheet=..., variant=..., portloc=..., 
    excl_targets=false, avoid_dialog=true, for_webpage=false, sysrootver=..., successful=95)
    at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:2736
#13 0x0000000000723c5b in portscan.operations.build_subpackages (builder=1, sysrootver=..., interactive=false, enterafter=...)
    at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:2885
#14 0x00000000006f67a9 in portscan.operations.parallel_bulk_run.build (<_task>=0x7fffffdfc980)
    at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:110
#15 0x00000000007b0ede in system__tasking__stages__task_wrapper () at s-tassta.adb:1225
#16 0x000000080114be5e in ?? () from /usr/lib/libpthread.so.0
#17 0x0000000000000000 in ?? ()

I will attempt to build the system with debugging information and diagnose things further.

ftigeot commented 6 years ago

More complete trace:

Program terminated with signal 4, Illegal instruction.
#0  0x0000000800af0b4b in tls_get_addr_common (dtvp=0xb, index=-10494208, offset=140737477859712)
    at /usr/src/libexec/rtld-elf/rtld.c:4371

(gdb) bt
#0  0x0000000800af0b4b in tls_get_addr_common (dtvp=0xb, index=-10494208, offset=140737477859712)
    at /usr/src/libexec/rtld-elf/rtld.c:4371
#1  0x0000000800aecd62 in __tls_get_addr (ti=<optimized out>) at /usr/src/libexec/rtld-elf/x86_64/reloc.c:459
#2  0x00000008011d747a in .cerror () at /usr/src/lib/libc/../libc/x86_64/sys/cerror.S:49
#3  0x0000000000000002 in ?? ()
#4  0x0000000801197d04 in realpath (path=path@entry=0x7fffff5ff150 "/usr/obj/ravenports/SL01/port/manifests/plist.single", 
    resolved=<optimized out>, resolved@entry=0x7fffff5fed40 "/usr/obj/ravenports/SL01/port/manifests/plist.single")
    at /usr/src/lib/libc/../libc/stdlib/realpath.c:160
#5  0x00000000007e6169 in __gnat_full_name (
    nam=nam@entry=0x7fffff5ff150 "/usr/obj/ravenports/SL01/port/manifests/plist.single", 
    buffer=buffer@entry=0x7fffff5fed40 "/usr/obj/ravenports/SL01/port/manifests/plist.single") at cstreams.c:199
#6  0x00000000007d1fb6 in system__file_io__open () at s-fileio.adb:987
#7  0x00000000007d01ca in system.direct_io.create (file=<optimized out>, mode=<optimized out>, name=..., form=...)
    at s-direio.adb:113
#8  0x0000000000413079 in file_operations.dump_contents_to_file.file_string_io.create (file=0x0, mode=out_file, name=..., 
    form=...) at /raven/toolchain/gcc8/lib/gcc/x86_64-raven-dragonfly5.0/8.2.0/adainclude/a-direio.adb:86
#9  0x0000000000412e83 in file_operations.dump_contents_to_file (contents=..., dossier=...)
    at /construction/ravenadm/ravenadm-1.08/src/file_operations.adb:77
#10 0x000000000044e25d in package_manifests.decompress_manifest (compressed_string=..., save_to_file=...)
    at /construction/ravenadm/ravenadm-1.08/src/package_manifests.adb:319
#11 0x00000000006c11b5 in specification_parser.parse_specification_file (dossier=..., specification=..., 
    opsys_focus=dragonfly, arch_focus=x86_64, stop_at_targets=false, extraction_dir=..., success=false)
    at /construction/ravenadm/ravenadm-1.08/src/specification_parser.adb:651
#12 0x0000000000720a55 in portscan.operations.parse_and_transform_buildsheet (buildsheet=..., variant=..., portloc=..., 
    excl_targets=false, avoid_dialog=true, for_webpage=false, sysrootver=..., successful=95)
    at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:2736
#13 0x0000000000723c5b in portscan.operations.build_subpackages (builder=1, sysrootver=..., interactive=false, 
    enterafter=...) at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:2885
#14 0x00000000006f67a9 in portscan.operations.parallel_bulk_run.build (<_task>=0x7fffffdfc6d0)
    at /construction/ravenadm/ravenadm-1.08/src/portscan-operations.adb:110
#15 0x00000000007b0ede in system__tasking__stages__task_wrapper () at s-tassta.adb:1225
#16 0x000000080114be5e in thread_start (arg=0x8012e03c0) at /usr/src/lib/libthread_xu/thread/thr_create.c:233
#17 0x0000000000000000 in ?? ()
jrmarino commented 4 years ago

I'm going to close this one. I've never seen this issue myself.