trishume / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

xlinuxtrack.so causes hard drive dismount and subsequent session failure. #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running linux-track on my system (specs listed below)

What is the expected output? What do you see instead?
Expected normal operations, but got unexpected hard drive dismount

What version of the product are you using? On what operating system?
latest version under ubuntu 11.04

Please provide any additional information below.

When the plugin is loaded into x-plane, upon starting x-plane my primary HDD 
(which is connected over USB) remount read only. unfortunately i cannot offer a 
log of dmesg's output, as the system refuses to write anything to the (now 
write protected) HDD. without he plugin installed, x-plane runs normally. 

Original issue reported on code.google.com by Usagi...@gmail.com on 9 Sep 2011 at 4:01

GoogleCodeExporter commented 9 years ago
Output of uname -a:

Linux <<hostname redacted>> 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 
19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

**output of lspci

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 12)
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port 
(rev 12)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 
Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High 
Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 1 (rev 06)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 2 (rev 06)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 3 (rev 06)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 4 (rev 06)
00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 5 (rev 06)
00:1c.6 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 7 (rev 06)
00:1c.7 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express 
Root Port 8 (rev 06)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 
Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation 5 Series Chipset LPC Interface Controller 
(rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port 
SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller 
(rev 06)
01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 210] (rev 
a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev 
a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI 
Express Gigabit Ethernet controller (rev 06)

**output of lsusb

Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 008: ID 04ca:002f Lite-On Technology Corp. 
Bus 001 Device 007: ID 046d:081a Logitech, Inc. 
Bus 001 Device 006: ID 06a3:0836 Saitek PLC 
Bus 001 Device 005: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
Bus 001 Device 004: ID 059b:0577 Iomega Corp. 
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Original comment by Usagi...@gmail.com on 9 Sep 2011 at 4:16

GoogleCodeExporter commented 9 years ago
Hi,
I'm sorry you experience such a problem, but to narrow things down, I'd still 
need some more informations...

First of all, which tracking device are you using?

Secondly, if you run ltr_gui, no problems occur?

Thirdly, can you fsck the disk (the best would be to start from live cd) to 
ensure the remount is not caused by a filesystem corruption?

Thank you,

Michal

Original comment by f.jo...@email.cz on 9 Sep 2011 at 8:51

GoogleCodeExporter commented 9 years ago
I am using a webcam as a tracking device. No problems if i run ltr_gui. Also, 
the last time fsck was run was this morning on boot and it came back clean. The 
only things fsck brought back were a couple orphaned journal entries caused by 
the hard kill i had to do to get the system to shut off after the HDD 
dismounted. 

Original comment by Usagi...@gmail.com on 9 Sep 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Thank you for the info...

Can you try one more thing? In the folder, where you compiled the linuxtrack, 
there is a directory src/tests and there should be a file called ltlib_test. If 
you run this file from the terminal, you should see your webcam comming alive 
and the program should start printing some numbers, then pause and restart 
printing numbers and then quit.

Does running this program causes the remounting too?

Also if you start XPlane with the plugin, but unplugged webcam, what does it do?

The thing is, the XPlane plugin is not doing anything that could cause root 
filesystem go to read only regime; the only things I'm aware of that could 
cause this is a filesystem corruption or problem communicating with the drive 
itself.

Other thing is that source of the plugin didn't change from the middle of the 
march and I didn't received any similar report, so I'm wandering in which way 
is your case different. One more thing to try out might be to try and run the 
XPlane with as little USB devices as possible and on as much different ports as 
possible to rule out the possibility that for example webcam and joystick drive 
suddenly more current and cause voltage on the USB drive to drop or just send 
some interference there... Maybe try running the USB disk through powered USB 
hub, if you happen to have access to one...

Let me know if some of this helps...
Kind regards,

Michal

PS. Could you still try to run that fsck from a live cd? Just to be completely 
sure...

Original comment by f.jo...@email.cz on 10 Sep 2011 at 4:57

GoogleCodeExporter commented 9 years ago
Okay, Here we go. 

ltlib_test went okay. Got the full output, and no errors in dmesg. i catted the 
output to a file is you wish to review it (see attachment). 

Disconnected the webcam, replaced the plugin symlink, and ran x-plane. One 
hard-restart later, I've confirmed that the plugin causes the issue whether or 
not the cam is plugged in. Also, i was able to run x-plane for roughly 2 hours 
without the plugin being there, so whether or not the plugin itself is causing 
the issue, it's a key element in it. 

Looking at the output from dmesg (wish i could get it to you!!), it looks like 
the plugin causes some sort of conflict in the USB hubs, which causes them to 
attempt to reset *everything*. The powered USB hub is a good idea, but i doubt 
it'll help, because the USB disk i use has its own independent power source. 

Also, i ran fsck, and all 3 partitions (/home /usr /home) came back clean. Full 
disclosure: i ran fsck from my laptop which was running a separate install of 
11.04, not  livecd. Just plugged the usb disk into it and fscked it like i 
would a flash drive. 

This one's a bear. I hate nebulous problems like this. From what i see from 
ltr_gui, i *really* want this to work!
Regards, 
-Aaron

Original comment by Usagi...@gmail.com on 10 Sep 2011 at 2:31

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, and i forgot to mention: the USB cables for the HDD and the accessories are 
on different USB hubs inside the computer. Here's a diagram: 

Original comment by Usagi...@gmail.com on 10 Sep 2011 at 2:43

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Aaron,
this is really strange...

The ltlib_test uses exactly the same comands and in the same way, as the XPlane 
plugin (as far as linuxtrack is concerned), so if the linuxtrack alone would be 
the cause, I'd think the problem would showed up there too.

Other thing that bothers me is, that with webcam I'm not touching USB at all - 
the libusb is utilised only in the trackir driver. So there is no reason or 
mean to reset it. And if the problem was caused by webcam enumeration code, 
again I'd suspect the ltlib_test would show it.

Crash with webcam unplugged also suggests that camera information gathering 
doesn't seem to be the cause.

There are few more things I can think of to try out...
First of all, can you run a memtest on the machine? There could be a memory 
problem in the part that gets utilised only when the XPlane is loaded.

Second thing - if I understand it correctly, the XPlane is on the USB drive, 
right?
Is there a chance to try and run XPlane with the linuxtrack off that laptop you 
mentiond? It doesn't have to be smooth or anything, just to see if the other 
system behaves the same...

Third thing - can you take a look to the /tmp - would there be some interesting 
info in the logfiles?

By the way - the crash dows happen before the XPlane fully starts? Does the 
webcam lights up?
Next week (lousy wifi connection) I can try and replicate the situation you are 
experiencing, just to make sure the catch is not in the system itself.
Kind regards,

Michal

Original comment by f.jo...@email.cz on 10 Sep 2011 at 4:46

GoogleCodeExporter commented 9 years ago
Hi Aaron.

Without logs it's rather hard to guess what's happening on your system. 
Fortunately there're at least two ways how to save your logs.

1. If you system has /dev/shm directory mounted then you can configure your 
syslog daemon to write logs to that directory. That directory is in RAM and not 
on HDD.

2. If you have two computers on network then you can configure syslog daemon on 
one computer to send data to syslog on the other by network.

Regards,
Alexander.

Original comment by ale...@evpatoria.com.ua on 10 Sep 2011 at 8:52

GoogleCodeExporter commented 9 years ago
OKay, what i'll do this evening (i'm doing production work at the moment) is 
i'll reproduce the issue and attempt to write to a drive that is attached via 
sshfs, as that's unlikely to dismount if/when things go south. 

Original comment by Usagi...@gmail.com on 10 Sep 2011 at 8:57

GoogleCodeExporter commented 9 years ago
Hello Aaron,
one more possibility (at work our IT guy uses it) is to snap interesting bits 
with a camera... Crude, but as long as you can put it on the screen, it works...

During the next week I'll try to replicate your situation - Ubuntu 11.04 64bit 
on a USB hard drive and webcam as a tracker to see if this particular 
configuration isn't the source of problems...
Thank you for your perseverance,

Michal

Original comment by f.jo...@email.cz on 11 Sep 2011 at 5:02

GoogleCodeExporter commented 9 years ago
OKay, 

The problem seems to trigger when the camera first is brought up as x-plane 
loads. 

Ran a memtest on all of my memory and it passed with no errors. 

i tried d to run x-linuxtrack with my laptop, but the symlink gets broken when 
the filesystem changes bases so it's not possible. Also, running the laptop 
(which has an AMD GPU) with the offending ubuntu install (which is set up for 
my desktop's NVidia GPU) doesn't allow OpenGL to run, so no x-plane =/. 

Next up is reproducing the issue with a laptop connected via sshfs... i'll keep 
you posted. 

Original comment by amoor...@odu.edu on 12 Sep 2011 at 2:17

GoogleCodeExporter commented 9 years ago
Hello Aaron,
unfortunately it seems the problem is somewhat tied to your particular 
configuration - I just tried to reproduce the problem as closely as I could - 
Ubuntu 11.04 64bit on a usb drive (along with XPlane) and webcam with latest 
revision of linuxtrack...
I tried to run XPlane several times with no problems whatsoever (XPlane loads, 
tracking works).

Some things that make me wander are those:
 - XPlane with plugin causes it, while ltlib_test doesn't (it uses the exactly same library and the same commands)
 - XPlane with plugin fails it even when webcam is not connected
 - Linuxtrack with webcam selected doesn't explicitly touch USB at all, everything goes through V4L2

I'm sorry I don't have any good news, but right now, with informations I have I 
can't tell what might be going on in there...
Kind regards,

Michal

Original comment by f.jo...@email.cz on 16 Sep 2011 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by f.jo...@email.cz on 12 Oct 2011 at 10:09