OpenLightingProject / ola

The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
https://www.openlighting.org/ola/
Other
644 stars 204 forks source link

OlaClientTester fails during make check on macOS #1165

Open ilovezfs opened 7 years ago

ilovezfs commented 7 years ago

The OlaClientTester test fails during make check on macOS (tested with 0.10.2 and 0.10.3).

Here is the build log: https://gist.github.com/ilovezfs/df18fb326c86c5173903f60c4b425a8e

test-suite.log is below:

==================================
   OLA 0.10.3: ./test-suite.log
==================================

# TOTAL: 86
# PASS:  85
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: ola/OlaClientTester
=========================

.F.olad/OlaDaemon.cpp:121: Using configs in /Users/joe/.ola
common/thread/Thread.cpp:194: Thread pref-saver, policy SCHED_OTHER, priority 31
common/file/Util.cpp:134: Could not open /usr/local/Cellar/ola/0.10.3/share/ola/pids:No such file or directory
olad/OlaServer.cpp:194: Server UID is 7a70:0f01000a
olad/OlaServer.cpp:206: Server instance name is OLA Server
olad/plugin_api/Preferences.cpp:424: Missing /Users/joe/.ola/ola-universe.conf: No such file or directory - this isn't an error, we'll just use the defaults
common/thread/Thread.cpp:194: Thread bonjour, policy SCHED_OTHER, priority 31
olad/OlaServer.cpp:481: Updated PID definitions.
olad/OlaServer.cpp:489: PID store is at 0x7f96bae05780
common/thread/Thread.cpp:194: Thread , policy SCHED_OTHER, priority 31
olad/plugin_api/Preferences.cpp:70: Could not open /Users/joe/.ola/ola-gpio.conf: Operation not permitted
olad/plugin_api/Preferences.cpp:70: Could not open /Users/joe/.ola/ola-milinst.conf: Operation not permitted
olad/plugin_api/Preferences.cpp:70: Could not open /Users/joe/.ola/ola-renard.conf: Operation not permitted
olad/PluginManager.cpp:195: Trying to start Dummy
olad/plugin_api/DeviceManager.cpp:105: Installed device: Dummy Device:1-1
olad/PluginManager.cpp:200: Started Dummy
olad/PluginManager.cpp:195: Trying to start ArtNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: ArtNet [10.0.1.15]:2-1
olad/PluginManager.cpp:200: Started ArtNet
olad/PluginManager.cpp:195: Trying to start ShowNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: ShowNet [10.0.1.15]:3-1
olad/PluginManager.cpp:200: Started ShowNet
olad/PluginManager.cpp:195: Trying to start ESP Net
olad/plugin_api/DeviceManager.cpp:105: Installed device: ESP Net [10.0.1.15]:4-1
olad/PluginManager.cpp:200: Started ESP Net
olad/PluginManager.cpp:195: Trying to start Serial USB
common/thread/Thread.cpp:194: Thread , policy SCHED_OTHER, priority 31
olad/PluginManager.cpp:200: Started Serial USB
olad/PluginManager.cpp:195: Trying to start Enttec Open DMX
common/io/IOUtils.cpp:39: open(/dev/dmx0): No such file or directory
plugins/opendmx/OpenDmxPlugin.cpp:80: Could not open /dev/dmx0 No such file or directory
olad/PluginManager.cpp:200: Started Enttec Open DMX
olad/PluginManager.cpp:195: Trying to start SandNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: SandNet [10.0.1.15]:7-1
olad/PluginManager.cpp:200: Started SandNet
olad/PluginManager.cpp:195: Trying to start StageProfi
olad/PluginManager.cpp:200: Started StageProfi
olad/PluginManager.cpp:195: Trying to start Pathport
common/network/IPV4Address.cpp:89: Could not convert address 673495534
olad/plugin_api/DeviceManager.cpp:105: Installed device: Pathport [10.0.1.15]:9-1
olad/PluginManager.cpp:200: Started Pathport
olad/PluginManager.cpp:195: Trying to start E1.31 (sACN)
olad/plugin_api/DeviceManager.cpp:105: Installed device: E1.31 (DMX over ACN) [10.0.1.15]:11-1
olad/PluginManager.cpp:200: Started E1.31 (sACN)
olad/PluginManager.cpp:195: Trying to start USB
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:4 @0x7f96bac01b40 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:3 @0x7f96bac083c0 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:2 @0x7f96bac047a0 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:0 @0x7f96bad0a470 [add]
libs/usb/LibUsbThread.cpp:49: -- Starting libusb thread
common/thread/Thread.cpp:194: Thread , policy SCHED_OTHER, priority 31
libs/usb/LibUsbThread.cpp:34: ----libusb event thread is running
olad/PluginManager.cpp:200: Started USB
olad/PluginManager.cpp:195: Trying to start OSC
plugins/osc/OSCNode.cpp:77: OSC Error. Code 9904, cannot find free port, 
olad/PluginManager.cpp:198: Failed to start OSC
olad/PluginManager.cpp:195: Trying to start KiNET
olad/plugin_api/DeviceManager.cpp:105: Installed device: KiNet Device:16-1
olad/PluginManager.cpp:200: Started KiNET
olad/PluginManager.cpp:195: Trying to start KarateLight
common/io/IOUtils.cpp:39: open(/dev/kldmx0): No such file or directory
plugins/karate/KaratePlugin.cpp:79: Could not open /dev/kldmx0 No such file or directory
olad/PluginManager.cpp:200: Started KarateLight
olad/PluginManager.cpp:195: Trying to start Milford Instruments
olad/PluginManager.cpp:200: Started Milford Instruments
olad/PluginManager.cpp:195: Trying to start Renard
olad/PluginManager.cpp:200: Started Renard
olad/PluginManager.cpp:195: Trying to start Open Pixel Control
olad/PluginManager.cpp:200: Started Open Pixel Control
olad/PluginManager.cpp:195: Trying to start GPIO
olad/PluginManager.cpp:200: Started GPIO
libs/usb/LibUsbThread.cpp:54: -- Stopping libusb thread
libs/usb/LibUsbThread.cpp:44: ----libusb thread exiting
olad/plugin_api/Preferences.cpp:70: Could not open /Users/joe/.ola/ola-server.conf: Operation not permitted
olad/plugin_api/Preferences.cpp:70: Could not open /Users/joe/.ola/ola-port.conf: Operation not permitted
ola/StreamingClient.cpp:172: The RPC socket has been closed, this is more than likely due to a framing error, perhaps you're sending too fast?
common/network/TCPSocket.cpp:158: connect(127.0.0.1:62368): Connection refused

ola/OlaClientWrapperTest.cpp:53: Assertion
Test name: OlaClientWrapperTest::testNoAutoStartNoOlad
assertion failed
- Expression: !(ola_client.Setup())
- Check for another instance of olad running

Failures !!!
Run: 2   Failure total: 1   Failures: 1   Errors: 0
FAIL ola/OlaClientTester (exit status: 1)
peternewman commented 7 years ago

This sounds like a duplicate of https://github.com/OpenLightingProject/ola/issues/958 . Can you unplug the special USB devices you've got connected so these lines don't appear and see if that improves it:

libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:4 @0x7f96bac01b40 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:3 @0x7f96bac083c0 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:2 @0x7f96bac047a0 [add]
libs/usb/HotplugAgent.cpp:166: USB hotplug event: 20:0 @0x7f96bad0a470 [add]

I'm also rather intrigued by this line: common/network/IPV4Address.cpp:89: Could not convert address 673495534

Had you done any Pathport config? Can you share your ifconfig -a output please?

ilovezfs commented 7 years ago

I'm one of the Homebrew maintainers and don't actually have any of the associated devices. I'm on my phone at the moment but this test was running in a macOS sandbox on a Skylake iMac without anything attached other than the wireless keyboard and trackpad. Executing make check outside of the sandbox led to additional test failures on top of this one.

You should be able to reproduce the issue by changing the brew formula to run make, make check, make install instead of just make install. Running it with brew install --debug --verbose will let you drop into a shell when the test fails.

peternewman commented 7 years ago

Could you give the output of lsusb in the sandbox then please?

I'm not a Mac owner, but do have access to one when necessary, we primarily target macports though, the homebrew port was done by one of our users. Although if this is the issue I think, it will occur on both anyway.

Could you give some detail on the additional test failures outside of the sandbox for completeness please?

ilovezfs commented 7 years ago

we primarily target macports though

No comment. lol

bash-3.2$ system_profiler SPUSBDataType
USB:

    USB 3.0 Bus:

      Host Controller Driver: AppleUSBXHCISPT
      PCI Device ID: 0xa12f 
      PCI Revision ID: 0x0031 
      PCI Vendor ID: 0x8086 

        Bluetooth USB Host Controller:

          Product ID: 0x8294
          Vendor ID: 0x05ac  (Apple Inc.)
          Version: 1.19
          Speed: Up to 12 Mb/sec
          Manufacturer: Broadcom Corp.
          Location ID: 0x14500000 / 4
          Current Available (mA): 1000
          Current Required (mA): 0
          Extra Operating Current (mA): 0
          Built-In: Yes

        FaceTime HD Camera (Built-in):

          Product ID: 0x8511
          Vendor ID: 0x05ac  (Apple Inc.)
          Version: 72.30
          Serial Number: CC2F9H01QGG9L2L0
          Speed: Up to 480 Mb/sec
          Manufacturer: Apple Inc.
          Location ID: 0x14400000 / 3
          Current Available (mA): 1000
          Current Required (mA): 500
          Extra Operating Current (mA): 0
          Built-In: Yes

        Magic Trackpad 2:

          Product ID: 0x0265
          Vendor ID: 0x05ac  (Apple Inc.)
          Version: 8.04
          Serial Number: CC25452013UG61CAF
          Speed: Up to 12 Mb/sec
          Manufacturer: Apple Inc.
          Location ID: 0x14300000 / 2
          Current Available (mA): 1000
          Current Required (mA): 500
          Extra Operating Current (mA): 800
          Sleep current (mA): 1300

bash-3.2$

test-suite.log: https://gist.github.com/ilovezfs/af89de492b93e1de062ac538bfb35b47

I'll run outside sandbox next.

ilovezfs commented 7 years ago

The sandbox was irrelevant. It was just a python path issue with finding protobuf. Same result outside the sandbox.

Here's test-suite.log with OLA 0.10.3 and no sandbox: https://gist.github.com/ilovezfs/01b20b32727be3ed3ffb2c57672d895b

ilovezfs commented 7 years ago

And this is outside of Homebrew: https://gist.github.com/ilovezfs/22c0e0ef5663e3e05121db5a93fd8944

peternewman commented 7 years ago

Can you also try running ./ola/OlaClientTester -l 4 Or you may need to do: ./ola/.libs/lt-OlaClientTester -l 4

Which should give more output.

ilovezfs commented 7 years ago

Sure: https://gist.github.com/ilovezfs/373496f9eee153695895483ee0803dcb

Solander commented 5 years ago

I get exactly the same error on my Linux machine. I'm running Ubuntu and trying to build from master. Any suggestions on how to make it work?

Solander commented 5 years ago

It seemed as port 9010 was in use and as soon as I terminated the service using that port (an older version of olad in my case), "make check" went through fine.

peternewman commented 5 years ago

It seemed as port 9010 was in use and as soon as I terminated the service using that port (an older version of olad in my case), "make check" went through fine.

Great, glad you've got your issue sorted @Solander . I think the main issue here is more complicated as there aren't other copies of olad or other things using the port running beforehand, it's just olad not stopping properly after it's test run.