Bug 38415 - Resync with upstream iTALC (windows)
Resync with upstream iTALC (windows)
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: iTALC
UCS@school 4.0
Other Linux
: P5 critical (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Florian Best
Daniel Tröder
: interim-1
: 40502 42623 (view as bug list)
Depends on: 38413 38703
Blocks: 40502
  Show dependency treegraph
 
Reported: 2015-05-01 01:21 CEST by Sönke Schwardt-Krummrich
Modified: 2016-11-10 16:00 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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 2015-05-01 01:21:34 CEST
The same code is used for the iTALC presentation mode between computers. This might explain, why sometime some iTALC clients fail to participate at the video distribution.
We should patch/update our code base and rebuild the Windows iTALC installer.

+++ This bug was initially created as a clone of Bug #38413 +++

In several UCS@school test environments numerous segfaults of the UCS@school computerroom module were noticed:

root@slave81:~# dmesg | grep segfault | tail -1
[125430.710625] univention-mana[24783]: segfault at 0 ip 00007f86125ef16b sp 00007f85ef8107d8 error 6 in libc-2.13.so[7f8612566000+182000]
root@slave81:~# dmesg | grep univention-mana | grep -c segfault
39
root@slave81:~#

When raising the debug level of the UMC modules to 4, the segfault vanished but reappeared when lowering the debug level back to 2.
After enabling core dumps in the UMC server and UMC modules, I were able to catch a core dump of the UCS@school computerroom module that gave interesting information:

See bug 37280 on how to enable core dumps for UMC components. I added 
"ulimit -c unlimited" to /etc/init.d/univention-management-console-server and checked the limits of the UMC module after restarting the UMC server and opening the first UMC module (limit should be "unlimited"):

root@slave81:~# pgrep -f univention-management-console-module
24205
root@slave81:~# cat /proc/24205/limits | grep core
Max core file size        unlimited            unlimited            bytes     
root@slave81:~# 

Next I tried to trigger the segfault. The core file of the module process could be found as "/core".

# ucr set repository/online/unmaintained=yes
# univention-install libc6-dbg italc-dbg gdb
# gdb /usr/bin/python2.7 core
[…]
(gdb) bt
#0  __memcpy_sse2 () at ../sysdeps/x86_64/multiarch/../memcpy.S:267
#1  0x00007f85f0a88fb5 in CopyRectangle (buffer=<optimized out>, x=<optimized out>, y=<optimized out>, w=800, h=1, client=<error reading variable: Unhandled dwarf expression opcode 0xfa>, 
    client=<error reading variable: Unhandled dwarf expression opcode 0xfa>, client=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
    at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/rfbproto.c:172
#2  0x00007f85f0a5f1ee in DecompressJpegRect32 (client=client@entry=0x2ff5e00, x=x@entry=0, y=y@entry=0, w=w@entry=800, h=h@entry=81) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/tight.c:580
#3  0x00007f85f0a5f3ca in HandleTight32 (client=client@entry=0x2ff5e00, rx=0, ry=0, rw=800, rh=81) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/tight.c:146
#4  0x00007f85f0a90d65 in HandleRFBServerMessage (client=0x2ff5e00) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/rfbproto.c:2101
#5  0x00007f85f0a647a2 in ItalcVncConnection::doConnection (this=this@entry=0x2ba5fa0) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/lib/src/ItalcVncConnection.cpp:644
#6  0x00007f85f0a648c8 in ItalcVncConnection::run (this=0x2ba5fa0) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/lib/src/ItalcVncConnection.cpp:524
#7  0x00007f861017cd0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f8613199b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#9  0x00007f861264270d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()
(gdb) up
#1  0x00007f85f0a88fb5 in CopyRectangle (buffer=<optimized out>, x=<optimized out>, y=<optimized out>, w=800, h=1, client=<error reading variable: Unhandled dwarf expression opcode 0xfa>, 
    client=<error reading variable: Unhandled dwarf expression opcode 0xfa>, client=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
    at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/rfbproto.c:172
172	  case 32: COPY_RECT(32); break;
(gdb) print client->frameBuffer
Unhandled dwarf expression opcode 0xfa
(gdb) up
#2  0x00007f85f0a5f1ee in DecompressJpegRect32 (client=client@entry=0x2ff5e00, x=x@entry=0, y=y@entry=0, w=w@entry=800, h=h@entry=81) at /var/build/temp/tmp.WeqkYO8HNb/pbuilder/italc-2.0.22/ica/x11/libvncclient/tight.c:580
580	    CopyRectangle(client, (uint8_t *)&client->buffer[RFB_BUFFER_SIZE / 2], x, y + dy, w, 1);
(gdb) print client->frameBuffer
$1 = (uint8_t *) 0x0
(gdb) 

It looks like it is not assured that the frameBuffer is already allocated when handling the first messages comming from the iTALC Windows client.
Comment 1 Michael Grandjean univentionstaff 2015-12-18 16:09:06 CET
Another case:

> root@ucs-abcde:~# dmesg -T | tail
> [Mi Dez 16 09:08:09 2015] univention-mana[19047]: segfault at 50 ip 00007f3af53e3afd sp 00007ffc5012cb50 error 4 in libItalcCore.so[7f3af53b8000+cc000]
> [Mi Dez 16 09:09:45 2015] univention-mana[21899]: segfault at 50 ip 00007f0822e76afd sp 00007ffefed17000 error 4 in libItalcCore.so[7f0822e4b000+cc000]
> [Mi Dez 16 10:29:49 2015] univention-mana[22250]: segfault at 50 ip 00007ffb3b17dafd sp 00007ffc25978870 error 4 in libItalcCore.so[7ffb3b152000+cc000]
> [Mi Dez 16 12:20:48 2015] univention-mana[31642]: segfault at 50 ip 00007f5f069b6afd sp 00007ffc1fa31ee0 error 4 in libItalcCore.so[7f5f0698b000+cc000]
> [Mi Dez 16 12:37:11 2015] univention-mana[652]: segfault at 50 ip 00007f6e22c38afd sp 00007ffc3d173a20 error 4 in libItalcCore.so[7f6e22c0d000+cc000]

> umc/module/debug/level: 2
> umc/server/debug/level: 2
Comment 2 Florian Best univentionstaff 2016-01-25 14:45:16 CET
I could reproduce this segfault by just switching the room twice to the same room as before.

#0  QMutexLocker (m=0x50, this=<synthetic pointer>) at /usr/include/qt4/QtCore/qmutex.h:109
No locals.
#1  ItalcVncConnection::enqueueEvent (this=0x0, e=0x241a5d0) at /var/build/temp/tmp.ADar7uxskZ/pbuilder/italc-2.0.25/lib/src/ItalcVncConnection.cpp:714
        lock = <optimized out>
#2  0x00007ff3e8a72314 in ItalcCoreConnection::enqueueMessage (this=0x241a300, msg=...) at /var/build/temp/tmp.ADar7uxskZ/pbuilder/italc-2.0.25/lib/src/ItalcCoreConnection.cpp:353
        m = {m_socketDevice = 0x0, m_cmd = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 389}, alloc = 0, size = 0, data = 0x7ff40ba6b8fa, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, 
            static shared_empty = {ref = {_q_value = 3}, alloc = 0, size = 0, data = 0x7ff40ba6b8da, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0xf37ab0, static codecForCStrings = 0x0}, m_args = {{d = 
    0x7ff40ba6b820, e = 0x7ff40ba6b820}}}
#3  0x00007ff3e8a728dc in ItalcCoreConnection::sendGetUserInformationRequest (this=<optimized out>) at /var/build/temp/tmp.ADar7uxskZ/pbuilder/italc-2.0.25/lib/src/ItalcCoreConnection.cpp:167
No locals.
#4  0x00007ff3e8d22ec1 in ?? () from /usr/lib/pymodules/python2.7/italc.so
No symbol table info available.
Comment 3 Florian Best univentionstaff 2016-01-25 15:07:33 CET
(In reply to Michael Grandjean from comment #1)
(In reply to Florian Best from comment #2)
→ Bug #40316
Comment 4 Florian Best univentionstaff 2016-01-26 14:56:56 CET
The iTALC code has been rebased to iTALC 2.0.2 (plus all commits in the github HEAD).
The windows binaries have been recompiled.

italc-windows (3.0.1-1):
r66972 | Bug #38415: update iTALC to 2.0.2
r66966 | Bug #38415: make FillRectangle() more robust against null pointer exceptions
r66958 | Bug #38415: update to latest iTALC
Comment 5 Florian Best univentionstaff 2016-07-04 15:59:21 CEST
*** Bug 40502 has been marked as a duplicate of this bug. ***
Comment 6 Florian Best univentionstaff 2016-07-04 16:24:38 CEST
All changes in 4.1 have been reverted and were automatically merged to 4.1R2 when creating the branch.
Comment 7 Florian Best univentionstaff 2016-07-04 16:30:26 CEST
The latest HEAD on github contains some more changes which are probably good, too.
Comment 8 Florian Best univentionstaff 2016-07-13 15:34:15 CEST
iTALC has been updated to 2.1-0.

italc-windows (3.0.2-2):
r70969 | Bug #38415: switch to ucs-school-4.1 branch and rebase
→ compile
r70919 | Bug #38415: switch to ucs-school-4.1 branch and rebase
→ rebase to all our specific patches
r70913 | Bug #38415: added windows builds of iTALC 2.1.0
→ compile
r70909 | Bug #38415: update to iTALC 2.1.0 and Ubuntu 16.04 as BuildEnv
→ use the github HEAD
Comment 9 Daniel Tröder univentionstaff 2016-09-01 15:52:56 CEST
OK: italc has been upgraded to upstream.
OK: 4.1 commits were reverted


BTW: iTALC 3.0.0 has been released.
Comment 10 Florian Best univentionstaff 2016-10-17 11:54:44 CEST
Rebase to latest iTALC 3.0.1 changes.
Comment 11 Florian Best univentionstaff 2016-10-17 12:53:09 CEST
*** Bug 42623 has been marked as a duplicate of this bug. ***
Comment 12 Florian Best univentionstaff 2016-10-19 15:29:32 CEST
italc-windows (3.0.3-1):
r73362 | Bug #38415: rebase to latest iTALC 3.0.0
r73272 | Bug #38415: rebase to iTALC 3.0
Comment 13 Daniel Tröder univentionstaff 2016-10-21 10:04:23 CEST
OK: after an update of its edu-slave, the 'iTALC-Installation' share used by a windows client contains the installer for italc v3.

The installer displays a banner image with italc v2, but that is an upstream error: https://github.com/iTALC/italc/issues/32
Comment 14 Florian Best univentionstaff 2016-10-21 16:23:06 CEST
I updated also omar:/var/univention/buildsystem2/contrib/iTALC-mingw-xenial
Comment 15 Sönke Schwardt-Krummrich univentionstaff 2016-11-10 16:00:45 CET
UCS@school 4.1 R2 v7 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v7-de.html

If this error occurs again, please clone this bug.