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

kiosk-browser possibly crashing on Ubuntu20/Debian #1377

Closed
benadida opened this issue Jan 31, 2022 · 10 comments · Fixed by votingworks/kiosk-browser#101
Closed

kiosk-browser possibly crashing on Ubuntu20/Debian #1377

benadida opened this issue Jan 31, 2022 · 10 comments · Fixed by votingworks/kiosk-browser#101
Assignees
Labels
Milestone

Comments

@benadida
Copy link
Contributor

No description provided.

@benadida benadida added the bug label Jan 31, 2022
@benadida benadida added this to the M13a Software milestone Jan 31, 2022
@benadida benadida modified the milestones: M13a Software, M13b Software Feb 1, 2022
@carolinemodic
Copy link
Contributor

Initial investigation notes: https://votingworks.slack.com/archives/CEL6D3GAD/p1643673731433799
Unassigning from myself as we are rolling back to ubuntu 18 for m13a

@carolinemodic carolinemodic removed their assignment Feb 2, 2022
@benadida benadida changed the title kiosk-browser possibly crashing on Ubuntu20 kiosk-browser possibly crashing on Ubuntu20/Debian Feb 7, 2022
@carolinemodic
Copy link
Contributor

I have seen this sometimes just ctrl+c-ing out of kiosk-browser but I'm not completely sure if thats the same error. The best way to repro involves a few minor changes to the code:

  1. Change this config variable from 5 minutes to something small like 10 seconds: https://github.com/votingworks/vxsuite/blob/main/frontends/bmd/src/config/globals.ts#L21
  2. pnpm start to run bmd
  3. run the smartcard service
  4. modify this script: https://github.com/votingworks/vxsuite-complete-system/blob/main/run-scripts/run-kiosk-browser-forever-and-log.sh so that it will work to run in a non-locked down machine. I would also remove the piping of the output so you can see what's going on better. You basically just need the while loop wrapped around a call to run-kiosk-browser.sh
  5. Run the above script to launch kiosk-browser running bmd, configure with an election if you are prompted to (you'll need to have a card reader plugged in, and either a printer plugged in or launch bmd with VX_APP_MODE='VxMark')
  6. Let BMD sit for 10 seconds on the "Insert Ballot Screen" it should then automatically close and kiosk-browser SHOULD relaunch however it instead seg faults when it closes and never relaunches.

At least on Ubuntu 20 the seg fault seemed to happen when this window.kiosk.quit() was called: https://github.com/votingworks/vxsuite/blob/main/frontends/bmd/src/app_root.tsx#L1382 which itself calls app.quit() in electron: https://github.com/votingworks/kiosk-browser/blob/main/src/ipc/quit.ts#L14

@umbernhard umbernhard changed the title kiosk-browser possibly crashing on Ubuntu20/Debian cd Feb 23, 2022
@umbernhard umbernhard changed the title cd kiosk-browser possibly crashing on Ubuntu20/Debian Feb 23, 2022
@umbernhard
Copy link
Contributor

I've successfully repro'd this on Debian.

@umbernhard
Copy link
Contributor

Running with gdb (which is not very informative for an electron app, but I digress), it looks like the SIGSEGV is maybe coming from libudev. Investigating more...

@umbernhard
Copy link
Contributor

Interesting, the crash doesn't happen until after a card reader is plugged in.

@umbernhard
Copy link
Contributor

Yep, confirmed it's a udev problem
image

@umbernhard
Copy link
Contributor

Triggered by our usb-detection node module.

@umbernhard
Copy link
Contributor

Running with node's segfault-handler module gives this traceback:
image

@umbernhard
Copy link
Contributor

I've replicated this issue on Debian 10, which is interesting. It may not be a udev problem, per se, but something about what the usb-detection module is doing.

@umbernhard
Copy link
Contributor

This issue has been on usb-detector's issue tracker for a while, apparently: MadLittleMods/node-usb-detection#57 (comment)

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

Successfully merging a pull request may close this issue.

3 participants