zotero / stream-server

Zotero Streaming API Server
GNU Affero General Public License v3.0
9 stars 8 forks source link

Debug segfaults in streamserver #32

Open jankap opened 7 months ago

jankap commented 7 months ago

Thanks for the great work to build Zotero. I'm trying to set up an air-gapped version and while all other services seem to run, the streamserver dies occasionally and sync with a rebuilt Zotero client does not work (endless syncing).

The log says

streamserver-1   | [03/Apr/2024:09:06:30 +0000] [1 connection, 5 subscriptions]
streamserver-1   | [03/Apr/2024:09:06:40 +0000] [1 connection, 5 subscriptions]
streamserver-1   | [03/Apr/2024:09:06:50 +0000] [1 connection, 5 subscriptions]
streamserver-1   | [03/Apr/2024:09:07:00 +0000] [1 connection, 5 subscriptions]
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] WebSocket connection was closed
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Removing subscription for /users/1
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Removing subscription for /users/1/publications
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Removing subscription for /groups/1
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Removing subscription for styles
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Removing subscription for translators
streamserver-1   | [03/Apr/2024:09:07:04 +0000] [10.5.5.1] Closing connection
streamserver-1   | Segmentation fault
streamserver-1   | npm ERR! code ELIFECYCLE
streamserver-1   | npm ERR! errno 139
streamserver-1   | npm ERR! zotero-stream-server@0.1.0 start: `node index.js`
streamserver-1   | npm ERR! Exit status 139
streamserver-1   | npm ERR!
streamserver-1   | npm ERR! Failed at the zotero-stream-server@0.1.0 start script.
streamserver-1   | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
streamserver-1   |
streamserver-1   | npm ERR! A complete log of this run can be found in:
streamserver-1   | npm ERR!     /root/.npm/_logs/2024-04-03T09_07_04_144Z-debug.log

And the mentioned debug log says

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle zotero-stream-server@0.1.0~prestart: zotero-stream-server@0.1.0
6 info lifecycle zotero-stream-server@0.1.0~start: zotero-stream-server@0.1.0
7 verbose lifecycle zotero-stream-server@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle zotero-stream-server@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle zotero-stream-server@0.1.0~start: CWD: /usr/src/app
10 silly lifecycle zotero-stream-server@0.1.0~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle zotero-stream-server@0.1.0~start: Returned: code: 139  signal: null
12 info lifecycle zotero-stream-server@0.1.0~start: Failed to exec start script
13 verbose stack Error: zotero-stream-server@0.1.0 start: `node index.js`
13 verbose stack Exit status 139
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid zotero-stream-server@0.1.0
15 verbose cwd /usr/src/app
16 verbose Linux 5.15.133.1-microsoft-standard-WSL2
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.9.4
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 139
22 error zotero-stream-server@0.1.0 start: `node index.js`
22 error Exit status 139
23 error Failed at the zotero-stream-server@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 139, true ]

I'm running it on a local Docker instance in WSL2.

What means error status 139, can I debug that a little bit more?

Thanks!