Bug 55048 - Adding driver through GUI causes RPC failure, crash on samba side
Adding driver through GUI causes RPC failure, crash on samba side
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
amd64 Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Julia Bremer
Felix Botner
https://bugzilla.samba.org/show_bug.c...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-01 10:06 CEST by Sven Anders
Modified: 2022-08-31 12:19 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.286
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022082421000315
Bug group (optional):
Max CVSS v3 score:


Attachments
Screenshot (281.88 KB, image/png)
2022-08-01 10:06 CEST, Sven Anders
Details
core dump (2.88 MB, application/octet-stream)
2022-08-01 10:08 CEST, Sven Anders
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Anders 2022-08-01 10:06:19 CEST
Created attachment 10968 [details]
Screenshot

Adding a printer driver with the printer management GUI causes the following error message:

"The driver XXX could not be installed.
 The remote procedure call failed."

(see screenshot)

I looked a the univention side to identify the cause of the problem and found the following problem:

==> /var/log/samba/log.rpcd_spoolss <==
[2022/08/01 09:51:15,  0] ../../source3/rpc_server/rpc_worker.c:1107(rpc_worker_main)
  rpcd_spoolss version 4.16.2-Univention started.
  Copyright Andrew Tridgell and the Samba Team 1992-2022
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:172(smb_panic_log)
  ===============================================================
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:176(smb_panic_log)
  INTERNAL ERROR: Signal 11: Speicherzugriffsfehler in pid 14869 (4.16.2-Univention)
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:181(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:182(smb_panic_log)
  ===============================================================
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:184(smb_panic_log)
  PANIC (pid 14869): Signal 11: Speicherzugriffsfehler in 4.16.2-Univention
[2022/08/01 09:51:15,  0] ../../lib/util/fault.c:288(log_stack_trace)
  BACKTRACE: 24 stack frames:
   #0 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x30) [0x7f7db35970d0]
   #1 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x9) [0x7f7db3597329]
   #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(+0xf3c1) [0x7f7db35973c1]
   #3 /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f7db28ac730]
   #4 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-samba4.so.0(mangle_is_mangled+0xa) [0x7f7db31cdf2a]
   #5 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base-samba4.so.0(unix_convert+0x15d6) [0x7f7db31686a6]
   #6 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(+0x1bf62) [0x559ffc420f62]
   #7 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(move_driver_to_download_area+0x21c) [0x559ffc423c9c]
   #8 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(_spoolss_AddPrinterDriverEx+0xc2) [0x559ffc44ba12]
   #9 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(+0x4b562) [0x559ffc450562]
   #10 /usr/lib/x86_64-linux-gnu/libdcerpc-server-core.so.0(dcesrv_loop_next_packet+0xe00) [0x7f7db3620530]
   #11 /usr/lib/x86_64-linux-gnu/libdcerpc-server-core.so.0(+0x91e0) [0x7f7db36211e0]
   #12 /usr/lib/x86_64-linux-gnu/libdcerpc-binding.so.0(+0xcc7f) [0x7f7db2c93c7f]
   #13 /usr/lib/x86_64-linux-gnu/samba/libsamba-sockets-samba4.so.0(+0x71a2) [0x7f7db36041a2]
   #14 /usr/lib/x86_64-linux-gnu/samba/libsamba-sockets-samba4.so.0(+0x5f6b) [0x7f7db3602f6b]
   #15 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_immediate_handler+0x17a) [0x7f7db2889f8a]
   #16 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_immediate+0x23) [0x7f7db2889fb3]
   #17 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0xde3b) [0x7f7db288fe3b]
   #18 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0xc0b7) [0x7f7db288e0b7]
   #19 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x91) [0x7f7db2888e51]
   #20 /usr/lib/x86_64-linux-gnu/samba/libRPC-WORKER-samba4.so.0(rpc_worker_main+0x90a) [0x7f7db357b46a]
   #21 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(main+0x2c) [0x559ffc417e2c]
   #22 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f7db262009b]
   #23 /usr/lib/x86_64-linux-gnu/samba/rpcd_spoolss(_start+0x2a) [0x559ffc417e6a]
[2022/08/01 09:51:15,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/log/samba/cores/rpcd_spoolss


The currently installed Univention version is: 5.0-2 errata352.
Comment 2 Arvid Requate univentionstaff 2022-08-01 11:01:17 CEST
Probably with this driver: https://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=mfcj5830dw_us&os=10013
Comment 3 Sven Anders 2022-08-01 11:14:52 CEST
The driver I used was:

https://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=mfcj6530dw_us_eu_as&os=10013

But I tried to upload another (HP) driver too and got the same RPC failure.
Comment 4 Daniel Duchon univentionstaff 2022-08-25 16:04:24 CEST
Another customer is reporting this issue.

He has discovered that this also happens when using rpcclient on the UCS systems directly.
Comment 5 Markus Dählmann 2022-08-25 17:06:38 CEST
I can actually reproduce this exact Bug with *any* printer driver on *any* newly installed UCS 5 school DC.
But on servers that were upgraded to UCS 5, only some printer drivers fail to upload, and even these vary between systems.
Needless to say, this needs to be fixed quickly, since i cannot provide printer drivers for clients on newly installed school DCs.
Comment 7 Julia Bremer univentionstaff 2022-08-26 11:48:53 CEST
The struct mangle_fns is not initialized in rpcd_spoolss.

This issue has already been reported to Samba and fixed in 4.16.3
https://bugzilla.samba.org/show_bug.cgi?id=15118

We applied the patch and built samba in the customer scope for now.

Successful build
Package: samba
Version: 2:4.16.2-1A~5.0.0.202208261037
Branch: ucs_5.0-0
Scope: sfb
User: jbremer
Comment 8 Felix Botner univentionstaff 2022-08-26 13:39:01 CEST
OK - driver upload via printmanagement.msc
OK - driver upload via rpcclient adddriver

customer will also test the package
Comment 9 Daniel Duchon univentionstaff 2022-08-26 13:53:23 CEST
Customer Feedback is positive.

Hint: samba-restart is needed after patch install.
Comment 10 Felix Botner univentionstaff 2022-08-26 14:55:42 CEST
https://git.knut.univention.de/univention/ucs/-/merge_requests/494
added 39_upload_printer_driver for a short "rpcclient adddriver" test

@julia, could you have a look (package ucs-test-samba-common from "deb [trusted=yes] http://omar.knut.univention.de/build2/git/fbotner-55048-rpcclient-test git main")
Comment 11 Felix Botner univentionstaff 2022-08-29 09:32:46 CEST
(In reply to Felix Botner from comment #10)
> https://git.knut.univention.de/univention/ucs/-/merge_requests/494
> added 39_upload_printer_driver for a short "rpcclient adddriver" test
> 
> @julia, could you have a look (package ucs-test-samba-common from "deb
> [trusted=yes]
> http://omar.knut.univention.de/build2/git/fbotner-55048-rpcclient-test git
> main")

merged

Successful build
Package: ucs-test
Version: 10.0.7-17A~5.0.0.202208290927
Branch: ucs_5.0-0
Scope: errata5.0-2
Comment 12 Julia Bremer univentionstaff 2022-08-29 09:57:53 CEST
Patch applied and built for errata5.0-2

Successful build
Package: samba
Version: 2:4.16.2-1A~5.0.0.202208290938
Branch: ucs_5.0-0
Scope: errata5.0-2
User: jbremer

r19700
65d8fe29bf Bug #55048: yaml
Comment 13 Felix Botner univentionstaff 2022-08-29 12:09:08 CEST
OK - manual driver upload via windows printmanagement.msc
OK - 53_samba-common/39_upload_printer_driver
OK - yaml

TODO wait for jenkins
Comment 14 Felix Botner univentionstaff 2022-08-30 08:15:21 CEST
OK - Jenkins