Skip to content

Segfault en version bytecode #3037

@vicuna

Description

@vicuna

Original bug ID: 636
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: David Mentr'e
Version: 3.03 alpha -with-pthread
OS: Linux RedHat 7.1, x86
Submission from: pochi.inria.fr (128.93.8.128)

Bonjour,

Mon programme, qui utilise les threads et marchait tres bien en 3.02 (avec
un petit patch de Xavier sur le marshalling des Big_array) produit un segfault
en 3.03 alpha, dans sa version bytecode.

Mon configure : ./configure -with-pthread -prefix
/local/mentre/install/ocaml-3.03-alpha

L'ensemble du programme est disponible a l'URL :
http://www-rocq.inria.fr/~mentre/tmp/adhocfs-triggering-3.03alpha-bug.tar.gz
Faire 'make test' pour compiler et lancer le programme (test/run_tests).

Le programme marche en code natif x86 (faire 'make testopt').

Le programme est 100% pur Caml, pas de C. Seul le marshalling pourrait etre
dangereux.

Il semble que ce soit un probleme de verrou avec les threads (d'apres la
backtrace de gdb).
C'est peut-etre un probleme avec la glibc (dans mon cas : 2.2.2).

Le backtrace gdb :
pochi(mentre):~/<1>development/adhocfs [40] gdb
/local/mentre/install/ocaml-3.03-alpha/bin/ocamlrun
GNU gdb 5.0rh-5 Red Hat Linux 7.1
[...]
(gdb) r test/run_tests
Starting program: /local/mentre/install/ocaml-3.03-alpha/bin/ocamlrun
test/run_tests
[New Thread 1024 (LWP 3155)]
[New Thread 2049 (LWP 3156)]
Delayed SIGSTOP caught for LWP 3156.
[New Thread 1026 (LWP 3157)]
Delayed SIGSTOP caught for LWP 3157.
crypto
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 3155)]
__pthread_unlock (lock=0xbffff820) at spinlock.c:180
180 spinlock.c: No such file or directory.
in spinlock.c
(gdb) bt
#0 __pthread_unlock (lock=0xbffff820) at spinlock.c:180
#1 0x40281d3c in __pthread_mutex_unlock (mutex=0xbffff810) at mutex.c:176
#2 0x40283eae in __funlockfile (stream=0xbffff830) at lockfile.c:48
#3 0x400e664d in _IO_vfprintf (s=0xbffff830, format=0xbffff958 "%ld",
ap=0xbffff91c)
at vfprintf.c:1842
#4 0x40104202 in _IO_vsprintf (string=0x806ef48 "1006188996x_shutdown",
format=0xbffff958 "%ld", args=0xbffff918) at iovsprintf.c:47
#5 0x400f0677 in sprintf (s=0x806ef48 "1006188996x_shutdown", format=0xbffff958
"%ld")
at sprintf.c:38
#6 0x08050a77 in format_int () at eval.c:41
#7 0x0805b1c7 in interprete () at eval.c:41
#8 0x0805c5c8 in caml_main () at eval.c:41
#9 0x0804e662 in main () at eval.c:41
#10 0x400ad177 in __libc_start_main (main=0x804e650

, argc=2,
ubp_av=0xbffffb9c,
init=0x804de4c <_init>, fini=0x805dbb4 <_fini>, rtld_fini=0x4000e184
<_dl_fini>,
stack_end=0xbffffb8c) at ../sysdeps/generic/libc-start.c:129

Si vous voulez plus d'infos, de tests, ..., vous n'avez qu'a me demander. :)

Amicalement,
d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions