Bug 1112568 - perl-Gtk2-SourceView2-0.10-2.fc21 FTBFS: /usr/bin/xvfb-run does not start X server
Summary: perl-Gtk2-SourceView2-0.10-2.fc21 FTBFS: /usr/bin/xvfb-run does not start X s...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Gtk2-SourceView2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
URL: http://koji.fedoraproject.org/koji/ta...
Whiteboard:
Depends On: 1113128
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-24 08:39 UTC by Petr Pisar
Modified: 2014-07-03 07:29 UTC (History)
2 users (show)

Fixed In Version: xorg-x11-server-1.15.99.903-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-03 07:29:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2014-06-24 08:39:13 UTC
perl-Gtk2-SourceView2-0.10-2.fc21 fails to build due Xvfb:

+ xvfb-run -a -w 1 make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Xlib:  extension "RANDR" missing on display ":99".
t/GtkSourceBuffer.t .............. ok
t/GtkSourceIter.t ................ skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceLanguage.t ............ skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceLanguageManager.t ..... skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceMark.t ................ skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourcePrintCompositor.t ..... skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceStyle.t ............... skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceStyleScheme.t ......... skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceStyleSchemeManager.t .. skipped: Gtk2->init_check failed, probably unable to open DISPLAY
t/GtkSourceView.t ................ skipped: Gtk2->init_check failed, probably unable to open DISPLAY
All tests successful.
Files=10, Tests=25,  2 wallclock secs ( 0.09 usr  0.09 sys +  0.91 cusr  0.70 csys =  1.79 CPU)
Result: PASS
/bin/xvfb-run: line 171: kill: (22645) - No such process
error: Bad exit status from /var/tmp/rpm-tmp.aU2xAu (%check)

The Xvfb seems not starting, so the last kill fails and that propagates as a test failure.

This could be caused by updated Xorg. The difference between last working and current build root is:

Removed packages:
	crypto-policies-0.9
	gdb-7.7.1
	hwdata-0.266
	libblkid-2.24.2
	libmount-2.24.2
	libuuid-2.24.2
	readline-6.2
	tzdata-2014c
	util-linux-2.24.2
	xorg-x11-server-common-1.15.99.902
	xorg-x11-server-Xvfb-1.15.99.902
Added packages:
	ccache-3.1.9
	crypto-policies-20140620
	gdb-7.7.90.20140613
	hwdata-0.267
	libblkid-2.25
	libmount-2.25
	libsmartcols-2.25
	libuuid-2.25
	readline-6.3
	tzdata-2014e
	util-linux-2.25
	xorg-x11-server-common-1.15.99.903
	xorg-x11-server-Xvfb-1.15.99.903


There is yet another latent bug: The spec file %check section reads:

xvfb-run -a -w 1 make test

which requires the Xvfb to start in 1 second. This is flawed as it can fail on slow machine. The xvfb-run tool should check X server readiness instead of dummy sleep.

Comment 1 Thierry Vignaud 2014-06-26 07:24:53 UTC
[reply] [−] Description Petr Pisar 2014-06-25 09:22:23 EDT

Various packages using xvfb-run to run tests against an X server start failing to build due a regression in the Xvfb or xvfb-run script. Before:

[test@fedora-21 tmp]$ rpm -q xorg-x11-server-Xvfb
xorg-x11-server-Xvfb-1.15.99.902-8.20140428.fc21.x86_64
[test@fedora-21 tmp]$ cat /tmp/test
#!/bin/sh
xhost
sleep 2
[test@fedora-21 tmp]$ xvfb-run -a /tmp/test
access control enabled, only authorized clients can connect

And after the upgrade:

[test@fedora-21 tmp]$ rpm -q xorg-x11-server-Xvfb
xorg-x11-server-Xvfb-1.15.99.903-1.fc21.x86_64
[test@fedora-21 tmp]$ xvfb-run -a /tmp/test 
access control enabled, only authorized clients can connect
/bin/xvfb-run: line 171: kill: (1991) - No such process
[test@fedora-21 tmp]$ echo $?
1

It looks like the Xvfb would terminate prematurely.

Petr Pisar 2014-06-25 09:26:32 EDT
Blocks: 1112568, 1112571, 1112609
[reply] [−] Comment 1 Petr Pisar 2014-06-25 09:36:17 EDT

Well, it segfaults when the client disconnects:

$ Xvfb -ac :0
(EE)
(EE) Backtrace:
(EE) 0: Xvfb (OsLookupColor+0x119) [0x561dd9]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f360e757e3f]
(EE) 2: Xvfb (FreePixmap+0x4) [0x525bd4]
(EE) 3: Xvfb (fbCloseScreen+0x64) [0x4256a4]
(EE) 4: Xvfb (PictureCloseScreen+0x51) [0x49c6c1]
(EE) 5: Xvfb (fbTile+0x9a8) [0x43ea28]
(EE) 6: Xvfb (PanoramiXRenderReset+0x85c) [0x4a6d9c]
(EE) 7: Xvfb (present_register_complete_notify+0x622) [0x4aa372]
(EE) 8: Xvfb (remove_fs_handlers+0x527) [0x50ddd7]
(EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f360d3860c0]
(EE) 10: Xvfb (_start+0x29) [0x422a1e]
(EE) 11: ? (?+0x29) [0x29]
(EE)
(EE) Segmentation fault at address 0x20
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)

[reply] [−] Comment 2 Petr Pisar 2014-06-25 09:50:41 EDT

Full back-trace:

(gdb) bt
#0  FreePixmap (pPixmap=0x0) at pixmap.c:129
#1  0x00000000004256a4 in fbCloseScreen (pScreen=0x7f00b0) at fbscreen.c:40
#2  0x000000000049c6c1 in PictureCloseScreen (pScreen=0x7f00b0) at picture.c:90
#3  0x000000000043e108 in CursorCloseScreen (pScreen=0x7f00b0) at cursor.c:187
#4  0x00000000004a65ec in AnimCurCloseScreen (pScreen=<optimized out>)
    at animcur.c:106
#5  0x00000000004a9d92 in present_close_screen (screen=0x7f00b0)
    at present_screen.c:63
#6  0x000000000050dd97 in dix_main (argc=3, argv=0x7fffffffe008,
    envp=<optimized out>) at main.c:349
#7  0x00007ffff5b5d0c0 in __libc_start_main (main=0x4229f0 <main>, argc=3,
    argv=0x7fffffffe008, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffdff8) at libc-start.c:289
#8  0x0000000000422a1e in _start ()
(gdb) bt full
#0  FreePixmap (pPixmap=0x0) at pixmap.c:129
No locals.
#1  0x00000000004256a4 in fbCloseScreen (pScreen=0x7f00b0) at fbscreen.c:40
        d = <optimized out>
        depths = 0x7f0720
#2  0x000000000049c6c1 in PictureCloseScreen (pScreen=0x7f00b0) at picture.c:90
        ret = <optimized out>
        n = <optimized out>
#3  0x000000000043e108 in CursorCloseScreen (pScreen=0x7f00b0) at cursor.c:187
        ret = <optimized out>
        close_proc = <optimized out>
        display_proc = <optimized out>
#4  0x00000000004a65ec in AnimCurCloseScreen (pScreen=<optimized out>)
    at animcur.c:106
        ret = <optimized out>
#5  0x00000000004a9d92 in present_close_screen (screen=0x7f00b0)
    at present_screen.c:63
No locals.
#6  0x000000000050dd97 in dix_main (argc=3, argv=0x7fffffffe008,
    envp=<optimized out>) at main.c:349
        i = 0
        alwaysCheckForInput = {0, 1}
#7  0x00007ffff5b5d0c0 in __libc_start_main (main=0x4229f0 <main>, argc=3,
---Type <return> to continue, or q <return> to quit---
    argv=0x7fffffffe008, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffdff8) at libc-start.c:289
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -6943193878347437744,
                4336117, 140737488347136, 0, 0, 6943194541387098448,
                6943207237135313232}, mask_was_saved = 0}}, priv = {pad = {
              0x0, 0x0, 0x56f0e0 <__libc_csu_init>, 0x7fffffffe008}, data = {
              prev = 0x0, cleanup = 0x0, canceltype = 5697760}}}
        not_first_call = <optimized out>
#8  0x0000000000422a1e in _start ()

It looks like a NULL dereference when freen a pixmap (pixmap.c:129). And indeed:

(gdb) info registers
rax            0x1      1
rbx            0x0      0
rcx            0x7ffff5efdcf0   140737319525616
rdx            0x0      0
rsi            0x0      0
rdi            0x0      0
rbp            0x7f0788 0x7f0788
rsp            0x7fffffffddd0   0x7fffffffddd0
r8             0x0      0
r9             0x7f0720 8324896
r10            0x0      0
r11            0x1      1
r12            0x7f00b0 8323248
r13            0x7f0720 8324896
r14            0x7dd700 8247040
r15            0x7e3d18 8273176
rip            0x525bd4 0x525bd4 <FreePixmap+4>
eflags         0x10206  [ PF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
---Type <return> to continue, or q <return> to quit---
gs             0x0      0
(gdb) disa
disable      disassemble
(gdb) disa
disable      disassemble
(gdb) disassemble
Dump of assembler code for function FreePixmap:
   0x0000000000525bd0 <+0>:     push   %rbx
   0x0000000000525bd1 <+1>:     mov    %rdi,%rbx
=> 0x0000000000525bd4 <+4>:     mov    0x20(%rdi),%rdi
   0x0000000000525bd8 <+8>:     mov    $0x9,%esi
   0x0000000000525bdd <+13>:    callq  0x526970 <_dixFiniPrivates>
   0x0000000000525be2 <+18>:    mov    %rbx,%rdi
   0x0000000000525be5 <+21>:    pop    %rbx
   0x0000000000525be6 <+22>:    jmpq   0x41fb60 <free@plt>
End of assembler dump.

Petr Pisar 2014-06-25 09:51:37 EDT
Summary: xvfb-run fails since xorg-x11-server-Xvfb-1.15.99.903-1.fc21.x86_64 → Xvfb NULL pointer derefence on client disconnect since xorg-x11-server-Xvfb-1.15.99.903-1.fc21.x86_6...
Petr Pisar 2014-06-25 09:51:50 EDT
Summary: Xvfb NULL pointer derefence on client disconnect since xorg-x11-server-Xvfb-1.15.99.903-1.fc21.x86_6... → Xvfb NULL pointer dereference on client disconnect since xorg-x11-server-Xvfb-1.15.99.903-1.fc21.x86...
Petr Pisar 2014-06-25 09:58:20 EDT
External Bug ID: FreeDesktop.org 80313
[reply] [−] Comment 3 Thierry Vignaud 2014-06-26 03:24:03 EDT

A workaround is available here:
http://svnweb.mageia.org/packages/cauldron/x11-server/current/SOURCES/fix-xvfb-crash.diff?revision=639902&view=markup

it fixes Gtk2 build on Mageia which was broken
(xvfb is segfaulting when a client connects but this is hidden by xvfb-run...)


Note You need to log in before you can comment on or make changes to this bug.