Crash on ninja -t browse <target>

Bug #1518967 reported by akappa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ninja-build (Ubuntu)
Confirmed
High
Unassigned

Bug Description

The command ninja -t browse <target> should show the dependency graph of <target> by first starting a python web server and then opening the served page in a browser.

However, the browser reports an empty response. The command reports the following errors:

Web server running on blue-star:8000, ctl-C to abort...
Web server pid 15280
Created new window in existing browser session.
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 43178)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "<stdin>", line 171, in do_GET
  File "<stdin>", line 151, in ninja_dump
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
----------------------------------------
----------------------------------------

My system configuration:

Release: Ubuntu 15.10
ninja-build: 1.3.4-1.1ubuntu1
---
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: GNOME
Dependencies:
 gcc-5-base 5.2.1-22ubuntu2
 libc6 2.21-0ubuntu4
 libgcc1 1:5.2.1-22ubuntu2
 libstdc++6 5.2.1-22ubuntu2
DistroRelease: Ubuntu 15.10
InstallationDate: Installed on 2013-07-10 (870 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130702)
Package: ninja-build 1.3.4-1.1ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.2.0-18.22-generic 4.2.3
Tags: wily
Uname: Linux 4.2.0-18-generic x86_64
UpgradeStatus: Upgraded to wily on 2015-09-23 (66 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I get the same error message when attempting to run `ninja -t browse <target>` on a project here on Ubuntu 15.10. I wasn't aware of this feature, but it sounds kinda neat. Do you know whether it has worked in older versions of Ubuntu, or if this might be the first time someone notices the failure?

Btw, could you please run the following command in a terminal, as it will automatically gather and add debugging information to this bug report:
apport-collect 1518967

This automatically adds version numbers and other useful information so you don't have to do it manually. When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in ninja-build (Ubuntu):
status: New → Confirmed
tags: added: wily
Revision history for this message
akappa (andrea86) wrote : JournalErrors.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
akappa (andrea86) wrote : ProcEnviron.txt

apport information

Revision history for this message
akappa (andrea86) wrote :

This is the first time I learned ninja supported this kind of features, so unfortunately I cannot say if this is a regression or if it has never worked.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for adding the requested information.

I've tested on Ubuntu Xenial now, and `ninja -t browse <target>` works fine there. Xenial has a newer version of ninja-build though (1.5.1-0.1ubuntu1), but I have to admit I don't know whether this bug is in ninja itself or the python web server it attempts to start.

Changed in ninja-build (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.