harvard-lil / perma

Indelible links
408 stars 72 forks source link

Error in scoop-rest-api container #3490

Closed rcking closed 3 months ago

rcking commented 3 months ago

I am trying to instantiate a perma.test instance, as described here: https://github.com/harvard-lil/perma/blob/develop/install.md

I succeeded in spinning it up, gaining admin access, creating users, etc.

When a user attempts to archive a page, the following Scoop error occurs:

2024-04-07 10:12:13,708 [INFO] celery_tasks.py 234: 78B5-VM4Q: capturing with the Scoop API.
2024-04-07 10:12:13,708 [INFO] celery_tasks.py 234: 78B5-VM4Q: capturing with the Scoop API.
78B5-VM4Q step 0: Starting capture
78B5-VM4Q step 1: Capturing with the Scoop REST API
78B5-VM4Q step 1.0182504852612813: Waiting for Scoop job 0d5d99a1-e052-4393-8add-fedc28ea2d6f to finish: started
Scoop finished in 1.8980810642242432s.
2024-04-07 10:12:15,652 [WARNING] celery_tasks.py 330: 78B5-VM4Q: Scoop failed during capture setup.
2024-04-07 10:12:15,652 [WARNING] celery_tasks.py 330: 78B5-VM4Q: Scoop failed during capture setup.
78B5-VM4Q capture failed.

This led me to check the docker logs for the container:

$ docker logs perma_scoop-rest-api_1

Creating tables...
Done.
Starting cron.
Starting periodic command scheduler: cron.
Starting Xvfb on :99
Launching parallel capture processes.
malloc(): invalid next size (unsorted)
(EE)
(EE) Backtrace:
(EE) 0: Xvfb (OsLookupColor+0x135) [0x5569fe36e445]
(EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) [0x7fd53c45d140]
(EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0x141) [0x7fd53c2aece1]
(EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x123) [0x7fd53c298537]
(EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (__fsetlocking+0x288) [0x7fd53c2f03a8]
(EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (pthread_attr_setschedparam+0x5ca) [0x7fd53c2f769a]
(EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (pthread_attr_setschedparam+0x3704) [0x7fd53c2fa7d4]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_calloc+0x81) [0x7fd53c2fcb11]
(EE) 8: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (__driDriverGetExtensions_zink+0x5e7510) [0x7fd53a77af70]
(EE) unw_get_proc_name failed: no unwind info found [-10]
(EE) 9: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (?+0x0) [0x7fd53a1938e8]
(EE) 10: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (__driDriverGetExtensions_zink+0x5e2814) [0x7fd53a776274]
(EE) 11: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (__driDriverGetExtensions_zink+0x5e27a8) [0x7fd53a776208]
(EE) 12: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (__driDriverGetExtensions_zink+0x654) [0x7fd53a1940b4]
(EE) 13: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (__driDriverGetExtensions_zink+0x5049ca) [0x7fd53a69842a]
(EE) 14: Xvfb (ht_dump_contents+0x8199) [0x5569fe26c519]
(EE) 15: Xvfb (ht_dump_contents+0x7017) [0x5569fe26b397]
(EE) 16: Xvfb (_CallCallbacks+0x34) [0x5569fe31afb4]
(EE) 17: Xvfb (ht_dump_contents+0x26e4f) [0x5569fe28b1cf]
(EE) 18: Xvfb (InitExtensions+0x89) [0x5569fe22dcf9]
(EE) 19: Xvfb (InitFonts+0x1e6) [0x5569fe319ae6]
(EE) 20: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xea) [0x7fd53c299d0a]
(EE) 21: Xvfb (_start+0x2a) [0x5569fe22bcba]
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(EE)
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://192.168.80.2:5000
Press CTRL+C to quit
Access key for user #5 (dev): <key-removed> ⚠️ This key will never be displayed again
Saving access key to 'docker/access_keys/access_key.txt'
/docker-entrypoint.sh: line 55:    39 Aborted                 (core dumped) Xvfb $DISPLAY
root@ba5110917625:/app# [2024-04-07T09:25:48.074997] Process #0 | Launched on port 9000

I conclude that all is not well with this image:

scoop-rest-api:
    image: registry.lil.tools/harvardlil/scoop-rest-api:52-e3380f176e1e3860b6590e4cba87f714

Any suggestions or corrections would be appreciated.

rcking commented 3 months ago

I have determined that this problem is related to a specific server, and is not related to the container itself. My apologies!

rebeccacremona commented 3 months ago

Oh I am so glad you figured it out! I was not able to reproduce on my end, and was going to ask about which architecture you were running on. We have only tested the current Docker setup on Mac and Ubuntu.

Cheers, and happy archiving!

bensteinberg commented 3 months ago

@rcking, I just put in a PR updating the Scoop REST API image, but if you want to try it out before it lands, you could change the image to 70-b2dc624d292610757b536a0fbbdd7a7e. Ah! I missed some of the traffic above. Never mind!