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

cupsd 2.4.7 crashes due to recent bug fixes (from issue #347) #934

Closed
andreas-karlson opened this issue Apr 9, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working priority-high
Milestone

Comments

@andreas-karlson
Copy link

I've been doing some testing for the new Ubuntu release (24.04).

I noticed that cupsd crashes consistently after closing my Firefox tab / window.
The title of the crash (from the bug-report window) is "cupsd crashed with SIGSEGV in ???()"

The proposed version of cups (2.4.7-1.2ubuntu4) backports the following commits:
df3718b (Issue #347)
6c6e1b0 (Issue #871)
ff16dab

I think the following commit introduced the bug since I'm unable to reproduce this behavior with versions prior to the commit being backported (and it has lots of changes):
df3718b - fixes #347

Reproduction steps

  1. Open Firefox and manage CUPS on http://localhost:631
  2. Go to Administration -> Printers -> Add Printer and choose your printer
  3. Add your printer (I used the ipps:// protocol to manage the printer)
  4. After clicking the "Add printer" button, immediately close your Firefox tab
  5. cupsd will crash and Ubuntu will display a bug-report popup

System Information
Ubuntu - 24.04 daily builds
Firefox - 124.0.1-1 r4033
CUPS - 2.4.7-1.2ubuntu5

Printer
Lexmark MS415dn (supported)

andreas-karlson added a commit to andreas-karlson/cups that referenced this issue Apr 9, 2024
…ting#934)

When adding a new printer a thread is created to handle PPD generation,
and the requesting client connection might close while the thread is running.
This commit prevents full connection cleanup until the thread is finished.
michaelrsweet added a commit that referenced this issue Apr 9, 2024
…nter-bug

scheduler: Fix potential bug when adding new printers (Issue #934)
@michaelrsweet michaelrsweet self-assigned this Apr 9, 2024
@michaelrsweet michaelrsweet added bug Something isn't working priority-high labels Apr 9, 2024
@michaelrsweet michaelrsweet added this to the v2.5 milestone Apr 9, 2024
@michaelrsweet
Copy link
Member

Using your PR for the 2.4.x fix, 2.5 fix is here:

[master 379f5d0] Fix regression for background queue creation (Issue #934)

@andreas-karlson
Copy link
Author

Thanks!

andreas-karlson added a commit to andreas-karlson/cups that referenced this issue Apr 10, 2024
The con->bg_pending value is used to indicate that the background thread
has finished running and that the connection can be safely closed.

This commit makes the con->bg_pending = 0 only after the connection
can be safely closed.
@andreas-karlson
Copy link
Author

After additional testing I've discovered that cupsd still crashes in some cases.
There needs to be a change in create_local_bg_thread to indicate the thread has finished.

I have updated my branch to accommodate for this change: #937

michaelrsweet added a commit that referenced this issue Apr 10, 2024
…nter-bug

scheduler: Fix regression in background thread (Issue #934)
@michaelrsweet
Copy link
Member

Change for 2.5:

[master d95df81] Don't mark BG thread done until the response is sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high
Projects
None yet
Development

No branches or pull requests

2 participants