Skip to content
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

Segfaults in version 4.3 #164

Open
jamesjer opened this issue Aug 5, 2020 · 7 comments
Open

Segfaults in version 4.3 #164

jamesjer opened this issue Aug 5, 2020 · 7 comments

Comments

@jamesjer
Copy link
Contributor

jamesjer commented Aug 5, 2020

I am the Fedora maintainer of the gnofract4d package. I am working on updating our package to gnofract4d 4.3, but am seeing segfaults in the test suite. You can see an example here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=48696332

The segfaults appear to be random; i.e., on this run, it was the arm and ppc64le builders that hit the issue. On other runs, it is a different architecture or architectures. The only commonalities I have noted are:

  • The segfaults always happen while running fract4dgui/tests/test_browser.py
  • The backtrace always points to somewhere in fract4d_compiler, although different places on different runs
@jamesjer
Copy link
Contributor Author

jamesjer commented Aug 5, 2020

FYI, I tried adding -DDEBUG_ALLOCATION as suggested in #109, but it looks like an #include is missing:

fract4d/c/fract_stdlib.cpp: In function ‘bool arena_add_page(arena_t)’:
fract4d/c/fract_stdlib.cpp:174:13: error: ‘stderr’ was not declared in this scope
  174 |     fprintf(stderr, "%p: ARENA PAGE : CTOR\n", newalloc);
      |             ^~~~~~
fract4d/c/fract_stdlib.cpp:7:1: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
    6 | #include "fract_stdlib.h"
  +++ |+#include <cstdio>
    7 | 
fract4d/c/fract_stdlib.cpp:174:5: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  174 |     fprintf(stderr, "%p: ARENA PAGE : CTOR\n", newalloc);
      |     ^~~~~~~
      |     rintf
fract4d/c/fract_stdlib.cpp: In function ‘s_arena* arena_create(int, int)’:
fract4d/c/fract_stdlib.cpp:195:13: error: ‘stderr’ was not declared in this scope
  195 |     fprintf(stderr, "%p: ARENA : CTOR(%d,%d)\n", arena, page_size, max_pages);
      |             ^~~~~~
fract4d/c/fract_stdlib.cpp:195:13: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
fract4d/c/fract_stdlib.cpp:195:5: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  195 |     fprintf(stderr, "%p: ARENA : CTOR(%d,%d)\n", arena, page_size, max_pages);
      |     ^~~~~~~
      |     rintf
fract4d/c/fract_stdlib.cpp: In function ‘void* arena_alloc(arena_t, int, int, int*)’:
fract4d/c/fract_stdlib.cpp:244:13: error: ‘stderr’ was not declared in this scope
  244 |     fprintf(stderr, "%p: ALLOC : (req=%d,esize=%d,nelem=%d)\n",
      |             ^~~~~~
fract4d/c/fract_stdlib.cpp:244:13: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
fract4d/c/fract_stdlib.cpp:244:5: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  244 |     fprintf(stderr, "%p: ALLOC : (req=%d,esize=%d,nelem=%d)\n",
      |     ^~~~~~~
      |     rintf
fract4d/c/fract_stdlib.cpp: In function ‘void arena_delete_page(allocation_t*)’:
fract4d/c/fract_stdlib.cpp:259:13: error: ‘stderr’ was not declared in this scope
  259 |     fprintf(stderr, "%p: ARENA PAGE : DTOR\n", alloc);
      |             ^~~~~~
fract4d/c/fract_stdlib.cpp:259:13: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
fract4d/c/fract_stdlib.cpp:259:5: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  259 |     fprintf(stderr, "%p: ARENA PAGE : DTOR\n", alloc);
      |     ^~~~~~~
      |     rintf
fract4d/c/fract_stdlib.cpp: In function ‘void arena_delete(arena_t)’:
fract4d/c/fract_stdlib.cpp:272:13: error: ‘stderr’ was not declared in this scope
  272 |     fprintf(stderr, "%p: ARENA : DTOR()\n", arena);
      |             ^~~~~~
fract4d/c/fract_stdlib.cpp:272:13: note: ‘stderr’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
fract4d/c/fract_stdlib.cpp:272:5: error: ‘fprintf’ was not declared in this scope; did you mean ‘rintf’?
  272 |     fprintf(stderr, "%p: ARENA : DTOR()\n", arena);
      |     ^~~~~~~
      |     rintf

@mindhells
Copy link
Member

mindhells commented Aug 6, 2020

Not sure if it has something to do, but as I can see here, the tests are running on Python 3.9, which is not even an official release:

platform linux -- Python 3.9.0b5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1

The DEBUG_ALLOCATION macro it's meant to print some debug information from the C++ fract4dc extension, but I think it won't help here since the errors you are getting are not related to that extension (apparently). Nevertheless we need to review those missing includes.

@josebailo
Copy link
Contributor

Hey @jamesjer, do you have any kind of metrics about the use of the package like how many downloads/installations has?

@jamesjer
Copy link
Contributor Author

Sorry for the delay. No, I'm afraid the Fedora project doesn't have any reliable way of collecting such metrics. It would be interesting information to have, but I'm afraid I can't provide it.

I will try building with python 3.8 and see what happens.

@jamesjer
Copy link
Contributor Author

A python 3.8 build finished flawlessly on all architectures. I'll see if I can figure out why python 3.9 is having issues, but this does seem to point away from gnofract4d and towards python as the cause of the problem.

@jamesjer
Copy link
Contributor Author

This turns out to be a gnofract4d bug after all. See #166 for an explanation.

@mindhells
Copy link
Member

@jamesjer #166 has been merged, please check if you can now create the package and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants