Bug 1189459 - perl-Debug-Client-0.29-3.fc22 FTBFS: Dead-lock in mock environment
Summary: perl-Debug-Client-0.29-3.fc22 FTBFS: Dead-lock in mock environment
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Term-ReadLine-Gnu
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/PadreIDE/Debug-Cli...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-05 11:48 UTC by Petr Pisar
Modified: 2015-09-23 10:32 UTC (History)
4 users (show)

Fixed In Version: perl-Term-ReadLine-Gnu-1.26-2.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 14:25:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CPAN 101078 0 None None None Never
Red Hat Bugzilla 1264742 0 unspecified CLOSED perl-Debug-Client-0.29-5.fc24 FTBFS: tests hang 2021-02-22 00:41:40 UTC

Internal Links: 1264742

Description Petr Pisar 2015-02-05 11:48:46 UTC
perl-Debug-Client-0.29-3.fc22 fails to build in mock because tests do not finish:

+ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00-check-deps.t ..... ok
# Info: Testing Debug::Client 0.29
# Info: Perl v5.20.1
t/01-compile.t ........ ok
t/02-exports.t ........ ok
t/03-pod.t ............ skipped: Author tests, not required for installation.
t/04-pod-coverage.t ... skipped: Author tests, not required for installation.
# 
# Info: Perl v5.20.1
# Info: OS linux
# Info: Term::ReadLine::Gnu installed
# Info: Using ReadLine implementation -> Term::ReadLine::Gnu
# INFO: $ENV{TERM} -> vt100
t/06-term.t ........... ok
  
^CCould not run mockbuild: 
ERROR: Exception(/home/petr/fedora/perl-Debug-Client/perl-Debug-Client-0.29-3.fc22.src.rpm) Config(rawhide-x86_64) 235 minutes 20 seconds

First noticed with this build root difference:

        perl-Term-ReadLine-Gnu 	1.25-1.fc22 	> 	1.26-1.fc22
	perl-CPAN-Meta-Check 	0.009-3.fc22 	> 	0.010-1.fc22
	perl-Getopt-Long 	2.42-310.fc22 	> 	2.43-1.fc22
	perl-Module-Build 	2:0.42.10-3.fc22 	> 	2:0.42.10-4.fc22
	perl-Test-Harness 	3.34-1.fc22 	> 	3.35-1.fc22
	perl-Compress-Bzip2 	2.19-2.fc22 	> 	2.20-1.fc22
	perl-inc-latest 		> 	2:0.42.10-4.fc22
	patch 	2.7.3-1.fc22 	> 	2.7.4-1.fc22
	libgpg-error 	1.17-1.fc22 	> 	1.17-2.fc22
	perl-IO-Socket-SSL 	2.010-1.fc22 	> 	2.011-1.fc22
	kernel-headers 	3.19.0-0.rc6.git2.1.... 	> 	3.19.0-0.rc6.git3.1....

Comment 1 Petr Pisar 2015-02-12 09:28:48 UTC
This is caused by upgrading perl-Term-ReadLine-Gnu from 1.25 to 1.26. The dead-lock is here:

$ prove -b -v t/07-initialize.t
t/07-initialize.t ..
1..4
ok 1 - initialize with prams
LOCK
ok 2 - quit with prams
ok 3 - initialize without prams
ok 4 - quit witout prams
ok

Either is a bug in the perl-Term-ReadLine-Gnu or it's a race in the test because of suspicious sleep call:

    ok( my $debugger = Debug::Client->new(
            host   => $host,
            port   => $port,
            porto  => $porto,
            listen => $listen,
            reuse  => $reuse_addr
        ),
        'initialize with prams'
    );
    $debugger->run;

    sleep 1;

    ok( $debugger->quit, 'quit with prams' );

Comment 2 Petr Pisar 2015-02-12 12:54:00 UTC
It halts in the $debug->run on reading response from perl debugger.

The Debug::Client::run() sends "c" command to the debugger and waits for a response. But no response comes because the "c" command is not flushed from buffers to the TCP socket.

This is caused by Term-ReadLine-Gnu commit:

r481 | hayashi | 2015-01-31 13:07:49 +0100 (So, 31 led 2015) | 2 lines
make handling of iostreams simple (make _rl_store_iostream() return void and remove _rl_fetch_iostream()) [rt.cpan.org #101078]

Comment 3 Petr Pisar 2015-02-12 13:29:53 UTC
Actualy the "c" command is flushed, but it's emitted before perl debugger is ready to process input. Either the debugger should buffer the input, or the Debug::Client should wait for debugger prompt. At the end, it's a race.

Comment 4 Petr Pisar 2015-02-12 14:18:49 UTC
There still something fishy with the perl debuger: It does not emit "DB<1>" prompt if the debugger is run from the t/07-initialize.t test. If the debugger is run from another session, it emits the "DB<1>". That explains why the debugger does not process the "c" command. But I don't know why the behaviour differs.

Comment 5 Petr Pisar 2015-02-12 14:26:11 UTC
Please note upstream moved from Padre track to <https://github.com/PadreIDE/Debug-Client>.

Comment 6 Petr Pisar 2015-02-17 14:04:32 UTC
This was a regression in the Term-ReadLine-Gnu-1.26. Upstream provided a patch. I will apply it to Fedora ≥ 22.

Comment 7 Petr Pisar 2015-02-17 14:25:58 UTC
Fixed as perl-Term-ReadLine-Gnu-1.26-2.fc22 in F22.


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