Bug 46390 - Computerroom module segfaults on room/aquire
Computerroom module segfaults on room/aquire
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 4.3
Other Linux
: P5 major (vote)
: UCS@school 4.3 v1
Assigned To: Sönke Schwardt-Krummrich
Jürn Brodersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-23 21:49 CET by Sönke Schwardt-Krummrich
Modified: 2019-02-27 18:04 CET (History)
1 user (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?: 4: Will affect most installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.571
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2018-02-23 21:49:03 CET
It looks like all attempts to call "computerroom/room/acquire" of the computerroom module result in a segfault of the UMC computerroom module. Therefore all related tests are currently failing.

ucs-test output:

[2018-02-23 02:55:19.504898] trying to restart UDM CLI server
[2018-02-23 02:55:19.526741] sending signal 15 to process 25218 (['/usr/bin/python2.7', '/usr/share/univention-directory-manager-tools/univention-cli-server'])
[2018-02-23 02:55:20.535404] process already terminated
[2018-02-23 02:55:20.535441] UCSTestUDM cleanup done
[2018-02-23 02:55:20.535453] Waiting for replication...
(2018-02-23 02:55:20.756307) Traceback (most recent call last):
(2018-02-23 02:55:20.756346)   File "22_computerroom_time_settings", line 40, in <module>
(2018-02-23 02:55:20.756358)     main()
(2018-02-23 02:55:20.756368)   File "22_computerroom_time_settings", line 36, in main
(2018-02-23 02:55:20.756378)     room.test_time_settings(client)
(2018-02-23 02:55:20.756389)   File "/usr/share/ucs-test/90_ucsschool/essential/computerroom.py", line 213, in test_time_settings
(2018-02-23 02:55:20.756400)     self.aquire_room(client)
(2018-02-23 02:55:20.756411)   File "/usr/share/ucs-test/90_ucsschool/essential/computerroom.py", line 119, in aquire_room
(2018-02-23 02:55:20.756422)     return client.umc_command('computerroom/room/acquire', {'room': self.dn}).result
(2018-02-23 02:55:20.756435)   File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 58, in umc_command
(2018-02-23 02:55:20.756445)     return super(Client, self).umc_command(*args, **kwargs)
(2018-02-23 02:55:20.756456)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 272, in umc_command
(2018-02-23 02:55:20.756466)     return self.request('POST', 'command/%s' % (path,), data, headers)
(2018-02-23 02:55:20.756477)   File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 69, in request
(2018-02-23 02:55:20.756486)     response = super(Client, self).request(method, path, data, headers)
[2018-02-23 02:55:20.756506] Done: replication complete.
[2018-02-23 02:55:20.756517] UCSTestSchool cleanup done
(2018-02-23 02:55:20.756573)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 297, in request
(2018-02-23 02:55:20.756588)     return self.send(request)
(2018-02-23 02:55:20.756598)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 316, in send
(2018-02-23 02:55:20.756610)     raise HTTPError(request, response, self.hostname)
(2018-02-23 02:55:20.756625) univention.lib.umc.HTTPError: 510 on slave2082 (command/computerroom/room/acquire): {"status": 510, "message": "", "traceback": null, "location": "https://slave2082/univention/command"}

management-console-server.log:

23.02.18 02:05:15.237  PARSER      ( INFO    ) : UMCP REQUEST 151936951520956-87 parsed successfully
23.02.18 02:05:15.237  MODULE      ( INFO    ) : Executing ['computerroom/room/acquire']
23.02.18 02:05:15.237  MAIN        ( INFO    ) : Setting locale 'de_DE'
23.02.18 02:05:15.237  MAIN        ( INFO    ) : Incoming request of type COMMAND
23.02.18 02:05:15.237  MODULE      ( INFO    ) : Executing ['computerroom/room/acquire']
23.02.18 02:05:15.237  MAIN        ( INFO    ) : Setting locale 'de_DE'
23.02.18 02:05:15.237  RESOURCES   ( INFO    ) : Searching for module providing command computerroom/room/acquire
23.02.18 02:05:15.238  RESOURCES   ( INFO    ) : Found module computerroom
23.02.18 02:05:15.238  MAIN        ( INFO    ) : Starting new module process and passing new request to module computerroom: 151936951520956-87
23.02.18 02:05:15.238  MAIN        ( PROCESS ) : running: ['/usr/sbin/univention-management-console-module', '-m', 'computerroom', '-s', '/var/run/univention-management-console/10840-1519369515238.socket', '-d',
 '4', '-n', 'qt', '-l', 'de_DE.UTF-8']
23.02.18 02:05:17.143  MAIN        ( INFO    ) : Connected to new module process
23.02.18 02:05:17.143  PROTOCOL    ( INFO    ) : Sending UMCP SET REQUEST 151936951714355-12
23.02.18 02:05:17.144  PROTOCOL    ( INFO    ) : Sending UMCP COMMAND REQUEST 151936951520956-87
23.02.18 02:05:17.147  PARSER      ( INFO    ) : UMCP RESPONSE 151936951714355-12 parsed successfully
23.02.18 02:05:17.147  PROTOCOL    ( INFO    ) : Received UMCP RESPONSE 151936951714355-12
23.02.18 02:05:17.242  MAIN        ( WARN    ) : Socket died (module=computerroom)
23.02.18 02:05:17.242  MAIN        ( WARN    ) : Module process computerroom died (pid: 16349, exit status: -1, signal: -1, status: -1)
23.02.18 02:05:17.242  MAIN        ( INFO    ) : Checking for kill timer ()
23.02.18 02:05:17.242  MAIN        ( WARN    ) : Cleaning up requests
23.02.18 02:05:17.242  MAIN        ( WARN    ) : Invalidating all pending requests 151936951520956-87
23.02.18 02:05:17.251  MAIN        ( WARN    ) : Remove inactivity timer
23.02.18 02:05:17.340  MAIN        ( PROCESS ) : ModuleProcess: child died
23.02.18 02:05:17.340  MAIN        ( WARN    ) : Module process computerroom died (pid: 16349, exit status: -1, signal: 11, status: 11)
23.02.18 02:05:17.340  MAIN        ( INFO    ) : Checking for kill timer ()
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2018-03-03 22:29:43 CET
Thread 1 "univention-mana" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/italc2.py", line 255, in open
    self._vnc.stateChanged.connect(self._stateChanged)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/italc2.py", line 243, in __init__
    self.open()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/italc2.py", line 715, in _set
    comp = ITALC_Computer(computer.get_udm_object(lo))
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/italc2.py", line 647, in room
    self._set(value)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/computerroom/__init__.py", line 336, in room_acquire
    self._italc.room = roomDN
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 145, in wrapper_func
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 309, in handle
    self.__handler.execute(cmd_obj.method, msg)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 182, in _recv
    self.handle(msg)
  File "/usr/lib/pymodules/python2.7/notifier/nf_qt.py", line 69, in notified
    if not self.method( self.socket ):
  File "/usr/lib/pymodules/python2.7/notifier/nf_qt.py", line 151, in step
    qt.QCoreApplication.processEvents( qt.QEventLoop.AllEvents | qt.QEventLoop.WaitForMoreEvents )
  File "/usr/lib/pymodules/python2.7/notifier/nf_qt.py", line 136, in loop
    step()
  File "/usr/sbin/univention-management-console-module", line 121, in <module>
    notifier.loop()


(gdb) bt                                                                                                                                                                                                           
#0  0x0000000000000000 in ?? ()                       
#1  0x00007f2b31ccb997 in sip_api_get_cpp_ptr () from /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so
#2  0x00007f2b31ccce38 in ?? () from /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so
#3  0x00007f2b32d1d623 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.x86_64-linux-gnu.so
#4  0x00005581585a983c in _PyObject_GenericGetAttrWithDict () at ../Objects/object.c:1439
#5  0x000055815865d032 in slot_tp_getattr_hook.lto_priv () at ../Objects/typeobject.c:5630
#6  0x00005581585bd9bb in PyEval_EvalFrameEx () at ../Python/ceval.c:2543
#7  0x00005581585c342f in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffe0e7202b8, func=<function at remote 0x7f2b0d88f050>) at ../Python/ceval.c:4437
#8  call_function (oparg=<optimized out>, pp_stack=0x7ffe0e7202b8) at ../Python/ceval.c:4372
#9  PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#10 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#11 0x00005581585d8a7e in function_call.lto_priv () at ../Objects/funcobject.c:523
#12 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#13 0x00005581585ef35e in instancemethod_call.lto_priv () at ../Objects/classobject.c:2602
#14 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#15 0x00005581585ef097 in slot_tp_init.lto_priv () at ../Objects/typeobject.c:5806
#16 0x00005581585aff34 in type_call.lto_priv () at ../Objects/typeobject.c:765
#17 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#18 0x00005581585c363f in do_call (nk=<optimized out>, na=1, pp_stack=0x7ffe0e720868, func=<PyQt4.QtCore.pyqtWrapperType at remote 0x55815a624ba0>) at ../Python/ceval.c:4569
#19 call_function (oparg=<optimized out>, pp_stack=0x7ffe0e720868) at ../Python/ceval.c:4374
#20 PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#21 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#22 0x00005581585d8c38 in function_call.lto_priv () at ../Objects/funcobject.c:523
#23 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#24 0x00005581585c4998 in ext_do_call (nk=0, na=0, flags=<optimized out>, pp_stack=0x7ffe0e720b20, func=<function at remote 0x7f2b0d891b18>) at ../Python/ceval.c:4666
#25 PyEval_EvalFrameEx () at ../Python/ceval.c:3028
#26 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#27 0x00005581585c3f15 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffe0e720d28, func=<function at remote 0x7f2b0d891b90>) at ../Python/ceval.c:4447
#28 call_function (oparg=<optimized out>, pp_stack=0x7ffe0e720d28) at ../Python/ceval.c:4372
#29 PyEval_EvalFrameEx () at ../Python/ceval.c:2989
#30 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#31 0x00005581585d8a7e in function_call.lto_priv () at ../Objects/funcobject.c:523
#32 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#33 0x00005581585aa084 in call_function_tail (args=(<ITALC_Manager(_Provider__signals={}) at remote 0x7f2b0c9cdab8>, 'cn=gsmitte-Raum0815,cn=raeume,cn=groups,ou=gsmitte,dc=nstx,dc=local'), 
    callable=<function at remote 0x7f2b0d891758>) at ../Objects/abstract.c:2579
#34 PyObject_CallFunction () at ../Objects/abstract.c:2603
#35 0x000055815864e82a in property_descr_set.lto_priv () at ../Objects/descrobject.c:1257
#36 0x00005581585d4688 in _PyObject_GenericSetAttrWithDict () at ../Objects/object.c:1507
#37 0x00005581585d4099 in PyObject_SetAttr () at ../Objects/object.c:1247
#38 0x00005581585be5e3 in PyEval_EvalFrameEx () at ../Python/ceval.c:2253
#39 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#40 0x00005581585d8c38 in function_call.lto_priv () at ../Objects/funcobject.c:523
#41 0x00005581585aa413 in PyObject_Call () at ../Objects/abstract.c:2547
#42 0x00005581585c4998 in ext_do_call (nk=0, na=0, flags=<optimized out>, pp_stack=0x7ffe0e721420, func=<function at remote 0x7f2b0d892938>) at ../Python/ceval.c:4666
#43 PyEval_EvalFrameEx () at ../Python/ceval.c:3028
#44 0x00005581585bbd45 in PyEval_EvalCodeEx () at ../Python/ceval.c:3584
#45 0x00005581585c3f15 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffe0e721628, func=<function at remote 0x7f2b0d8929b0>) at ../Python/ceval.c:4447
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2018-03-03 22:43:37 CET
When the following lines are commented out in italc2.py, the computer room module starts. The fix from bug 41752 is reversed with this change. It still has to be checked whether the fix from bug 41752 is still necessary and where or why the null pointer exception is triggered.

self._vnc.stateChanged.connect(self._stateChanged)

self._vnc.stateChanged.disconnect(self._stateChanged)
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2018-03-07 15:55:23 CET
The source packages "italc" and "python-italc" were not built for UCS@school 4.3. Instead, the versions of UCS@school 4.2 were used, which apparently were not compatible with the current libraries of e. g. qt4 or openssl.

The build of "italc" failed, because our buildsystem is currently not able to build packages in which git submodules are used.
The package was therefore manually checked out of git and copied to omar, a source package was created and imported into the build system:

Copy ucsschool.git:italc/* to omar:/tmp/foo/italc/
Copy italc.git:* to omar:/tmp/foo/italc/italc/
omar$ cd /tmp/foo
omar$ dpkg-source -b italc
omar$ repo_admin.py -F -p italc -r 4.3-0-0 -s ucs-school-4.3
omar$ 

Afterwards the package build of both packages has been successful and my test system showed no problems anymore while using the computerroom module with win8.1 clients.

italc (3:2.0.2-3)
f86c42a576d9 | Bug #46390: switch iTALC from openssl 0.9.8 to 1.1.0

I started a bunch of ucs-test scripts and they looked good.
Comment 4 Jürn Brodersen univentionstaff 2018-03-12 11:04:29 CET
What I tested:
git submodule init  italc
git submodule update italc

-> resulting hash: e6d0027b4459eff3fd66ddb315fbf7f05f6b2ae7 -> OK

Functionality tests will be done during the product testing phase.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2018-03-14 13:11:49 CET
UCS@school 4.3 v1 has been released.

https://docs.software-univention.de/release-notes-ucsschool-4.3v1-de.html

If this error occurs again, please clone this bug.