Skip to content

seafile-mc 13.0-latest (13.0.15) crashes on older x86_64 CPU: gunicorn worker SIGILL (invalid opcode) in numpy _multiarray_umath; 13.0.12 works #478

@Zahrun

Description

@Zahrun

Summary

On an older x86_64 host (no SSE4.1/SSE4.2), seafileltd/seafile-mc:13.0-latest becomes unhealthy and Nginx returns 502 because Seahub (gunicorn) crashes. Kernel logs show trap invalid opcode in NumPy’s _multiarray_umath extension. The same host works with seafile-mc:13.0.12.

Also reported on the forum https://forum.seafile.com/t/error-on-seafile-docker-upgrade-13-0-15-core-dump-because-of-numpy/24870/3

Expected

Seahub responds on http://127.0.0.1:8000 and Nginx on port 80 proxies successfully; container healthcheck stays healthy.

Actual

  • curl http://127.0.0.1/ returns 502 Bad Gateway
  • curl http://127.0.0.1:8000/ returns Empty reply from server or connection refused
  • gunicorn worker exits with code 132 (SIGILL)
  • dmesg shows invalid opcode in NumPy _multiarray_umath.cpython-312-x86_64-linux-gnu.so

Reproduction

  1. Start stack using seafileltd/seafile-mc:13.0-latest on an older x86_64 CPU (no SSE4.2).
  2. Wait for container startup.
  3. Observe container unhealthy, Nginx 502, and Seahub not responding.

Versions / Environment

  • Host arch: x86_64
  • CPU flags (no SSE4.1/4.2): fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm arat
  • Docker image:
  • failing: seafileltd/seafile-mc:13.0-latest (13.0.15)
  • working: seafileltd/seafile-mc:13.0.12
  • Python: 3.12 (inside container)
  • NumPy packaged in failing image: numpy==2.4.0 (from dist metadata)

Evidence / Logs

Healthcheck / Nginx

docker exec -it seafile bash -lc 'curl -v --max-time 3 http://127.0.0.1/'*   Trying 127.0.0.1:80...
* Connected to 127.0.0.1 (127.0.0.1) port 80
> GET / HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/8.5.0
> Accept: */*
> 
< HTTP/1.1 502 Bad Gateway
< Server: nginx
< Date: Tue, 27 Jan 2026 06:23:17 GMT
< Content-Type: text/html
< Content-Length: 150
< Connection: keep-alive
< 
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host 127.0.0.1 left intact

Direct Seahub

docker exec -it seafile bash -lc 'curl -v --max-time 5 http://127.0.0.1:8000/'
*   Trying 127.0.0.1:8000...
* Connected to 127.0.0.1 (127.0.0.1) port 8000
> GET / HTTP/1.1
> Host: 127.0.0.1:8000
> User-Agent: curl/8.5.0
> Accept: */*
> 
* Empty reply from server
* Closing connection
curl: (52) Empty reply from server

gunicorn worker death (code 132)

dmesg -T | tail -n 1
[mar. 27 janv. 06:25:46 2026] traps: python3[210309] trap invalid opcode ip:7f1847c71ccc sp:7ffe9be39228 error:0 in _multiarray_umath.cpython-312-x86_64-linux-gnu.so[7f1847c6f000+793000]

Suspected root cause

The image includes NumPy 2.4.0. On CPUs without SSE4.2, importing/executing NumPy native code can SIGILL (“invalid opcode”), killing the gunicorn worker and causing Nginx to 502. (This looks like a baseline instruction-set mismatch for the shipped wheel.) Cf. numpy/numpy#30492

Possible solution

Disable numpy CPU optimizations with pip install --no-binary numpy numpy -Csetup-args=-Dcpu-baseline=none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions