Skip to content

std-tests sometime segfault #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
antoyo opened this issue Jan 10, 2023 · 3 comments
Open

std-tests sometime segfault #245

antoyo opened this issue Jan 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@antoyo
Copy link
Contributor

antoyo commented Jan 10, 2023

Can reproduce locally by running the following command in an infinite loop:

./test.sh --std-tests

Gdb output:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  lookup_page_table_entry (p=0xfa91b8780000001e) at /gcc-repo/gcc-build/build/../../gcc/gcc/ggc-page.cc:630

warning: Source file is more recent than executable.
630	  while (table->high_bits != high_bits)
=> 0x00007f9e5d08308b <_Z12ggc_set_markPKv+43>:	48 3b 48 08	cmp    rcx,QWORD PTR [rax+0x8]
   0x00007f9e5d08308f <_Z12ggc_set_markPKv+47>:	75 f7	jne    0x7f9e5d083088 <_Z12ggc_set_markPKv+40>
[Current thread is 1 (Thread 0x7f9e531ff6c0 (LWP 444345))]
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) p table
$1 = (page_table) 0x0
(gdb) list
625	#if HOST_BITS_PER_PTR <= 32
626	  base = &G.lookup[0];
627	#else
628	  page_table table = G.lookup;
629	  uintptr_t high_bits = (uintptr_t) p & ~ (uintptr_t) 0xffffffff;
630	  while (table->high_bits != high_bits)
631	    table = table->next;
632	  base = &table->table[0];
633	#endif
@antoyo antoyo added the bug Something isn't working label Jan 10, 2023
@bjorn3
Copy link
Member

bjorn3 commented Jan 10, 2023

Maybe try enabling the ENABLE_GC_CHECKING and ENABLE_GC_ALWAYS_COLLECT macros when compiling libgccjit? (I believe there are also commandline options, but couldn't find their name)

@antoyo
Copy link
Contributor Author

antoyo commented Sep 9, 2023

I cannot reproduce locally, so if I don't see this failure in the CI anymore, I'll close this issue.

@antoyo
Copy link
Contributor Author

antoyo commented Oct 18, 2023

Maybe this was fixed by the GGC fix. Check to make sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants