-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
deadlock happens when delete printer #297
Comments
@tangyanli In general, when you encounter a new issue, it is best to report it in a new issue and not as a comment to a bug that was closed two years ago... I will investigate further... |
OK, looking at the PAPPL code and the backtrace, the issue is that driver delete callback in the printer application you are using is (incorrectly and unnecessarily) calling papplSystemRemoveResource. It seems that I might want to update papplPrinterDelete so that the printer can first be removed from the system object and then delete the rest of the printer object without holding the system rwlock... |
Thanks, Michael! I still have a query.
For the legacy-printer-app, which is the best way to delete the printer's related resource (e.g the localization strings) allocated by the function papplSystemAddStringsData(). |
@tangyanli WRT printer resources, as long as the resource path is relative to the printer's prefix ("/ipp/print/PRINTERNAME/RESOURCENAME.EXT") then the delete callback doesn't need to call papplSystemRemoveResource. The change I made will allow the delete callback to remove resources, however, just in case the resource isn't under the printer's path. |
Hi, Michael:
I reported the bug on #141, and there isn't any reply. So I report this new one.
Describe the bug
The pappl (v1.40) deadlocks when delete a printer on web page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The delete operation should success.
Screenshots
I tried several printer-apps, the hp-printer-app cannot reproduce this issue.
The ps-printer-app can reproduce depends on the selected driver.
System Information:
Additional context
I analyses the code, when the deadlock happens, the call stack as below:
The _papplRWLockWrite() is invoked twice before unlocking. So I tried to comment the papplSystemRemoveResource() in function _prDriverDelete(), then this issue cannot be reproduced.
Then I added the "-DDEBUG", and when deleting the printer, the output is as below:
I don't know how to investigate further, please help.
The text was updated successfully, but these errors were encountered: