Menu

#19 [174f:6a31] Rev.99 complete system hang if concurrent init

v1.1.0
open
nobody
Driver (13)
5
2011-02-19
2011-02-19
No

Description
Complete system hang when two instances of skype (or any other application ?) attempt to *init* the webcam at the same time.

Webcam
174f:6a31 (Asus V1S AS004E)

OS
Fedora 14 amd64

Source
svn co -r 99 https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver
This is the latest rev. I could build, 100 & 101 don't(*)

Kernel
2.6.35.10-74.fc14.x86_64
This is the latest kernel against which I could compile rev.99(*)

Error
Launch 2 copies of skype (distinct ids)... almost at once
The whole system hangs instantly, video is frozen.
Webcam led remained turned on "forever"

Reproducible
Always.. if launching them *really* at once
First time was not expected, then I could reproducte it for confirmation
(but it took 4 consecutive attempts to reproduce it)

Workaround
Launch any program that init the webcam, one after each other ^^

Additional Info
Normal usage
I'm always running several webcam-aware apps concurrently
(GTalk plugin, multiple Skypes, Kopete) without issue.
Each initialize the webcam once, one after each other.
(led blinks once for each app, in turn)
I have no issues running these apps concurrently all day.

About skype
using latest version available (2.1.0.81)
I personnaly use panel shortcuts to run each id (mouse clicks),
hence both executions aren't perfectly sync'ed, but enough!
If the error doesn't come right away, try
echo user1 pwd1 | skype --pipelogin & ;
echo user2 pwd2 | skype --pipelogin &

First time (unwanted)
Crash wasn't detected (screen frozen eg. cursor animation "paused")
X screen totally locked up, Ctrl+Alt+Back or +F2 had no effect
No answer on ssh port (adapter still answering to pings)
Hard power off... after boot, everything just worked again
Couldnt find any trace of the hang in /var/log/messages
(log seems to have just aborted)
Second time (reproducing)
Crash was detected and managed (blue screen with fedora logo)
Hard power off... after boot, everything just worked again
Could find the following in /var/log/messages (many occurences):
stk11xx: isoc_handler() called with status -108 [Unknown].
stk11xx: Error (-2) re-submitting urb in stk11xx_isoc_handler.
process `skype' is using obsolete setsockopt SO_BSDCOMPAT
stk11xx: Error : Register 0x0001 = 02
hub 2-0:1.0: unable to enumerate USB device on port 3
Then come the kernal oops messages, submitted via ABRT's wizard
(can't provide the url, kerneloops.org website seems have issues)

WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0xde/0xf8()
Hardware name: V1S
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3:1.0/ep_82'
Modules linked in: rfcomm sco bnep l2cap vboxnetadp vboxnetflt vboxdrv sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 kvm_intel kvm uinput stk11xx snd_hda_codec_si3054 snd_hda_codec_realtek btusb arc4 ecb bluetooth snd_hda_intel snd_hda_codec iwlagn snd_hwdep snd_seq snd_seq_device videodev r852 iwlcore sm_common nand v4l1_compat v4l2_compat_ioctl32 snd_pcm nand_ids snd_timer nand_ecc mac80211 mtd snd iTCO_wdt asus_laptop e1000e soundcore cfg80211 joydev serio_raw tpm_infineon iTCO_vendor_support microcode sparse_keymap snd_page_alloc rfkill cryptd aes_x86_64 aes_generic xts gf128mul dm_crypt sdhci_pci sdhci firewire_ohci mmc_core firewire_core crc_itu_t pata_acpi ata_generic nouveau ttm drm_kms_helper drm i2c_algo_bit video output i2c_core [last unloaded: scsi_wait_scan]
Pid: 2956, comm: skype Tainted: G W 2.6.35.10-74.fc14.x86_64 #1
Call Trace:
[<ffffffff8104d999>] warn_slowpath_common+0x85/0x9d
[<ffffffff8104da54>] warn_slowpath_fmt+0x46/0x48
[<ffffffff8116f1ad>] sysfs_add_one+0xde/0xf8
[<ffffffff8116f23d>] create_dir+0x76/0xae
[<ffffffff8116f327>] sysfs_create_dir+0x94/0xab
[<ffffffff8121a061>] kobject_add_internal+0x117/0x237
[<ffffffff8121a4ff>] kobject_add+0x91/0xa2
[<ffffffff81109734>] ? kmem_cache_alloc_notrace+0x8b/0xb1
[<ffffffff812d4f5b>] device_add+0x115/0x590
[<ffffffff812df21e>] ? pm_runtime_init+0xd1/0xd5
[<ffffffff812d53f4>] device_register+0x1e/0x22
[<ffffffff8133e092>] usb_create_ep_devs+0xe5/0x10c
[<ffffffff81336864>] create_intf_ep_devs+0x50/0x6c
[<ffffffff813384ec>] usb_set_interface+0x2f0/0x32c
[<ffffffff811182c9>] ? fput+0x22/0x1ed
[<ffffffffa03d4432>] dev_stk11xx_camera_off+0x16/0x2c [stk11xx]
[<ffffffffa03d1e49>] v4l_stk11xx_release+0x61/0x75 [stk11xx]
[<ffffffffa02ba3ff>] v4l2_release+0x3e/0x5f [videodev]
[<ffffffff811183e2>] fput+0x13b/0x1ed
[<ffffffff81115613>] filp_close+0x66/0x70
[<ffffffff811156b2>] sys_close+0x95/0xd5
[<ffffffff810375b0>] sysenter_dispatch+0x7/0x2e

I can provide additional info if needed.
Xavier

(*) notes: distinct bug reports

Discussion

  • Xavier Hourcade

    Xavier Hourcade - 2011-02-19
    • labels: --> Driver
    • milestone: --> v1.1.0
     
  • cristi

    cristi - 2011-03-05

    Confirm this is happening to me too. Laptop Asus V1s. Camera id 174f:6a31
    Happens when desktop environment starts, and in it skype and kopete start kindof' simultaneously.
    Laptop freezes. I'm still able to reset via ctrl-alt-printScr-B
    Unfortunately I didn't collect any info from logs.

     
  • cristi

    cristi - 2011-03-05

    err. forgot: Mandriva Cooker, amd64. kernel 2.6.36-desktop-2mnb. Stk driver version 2.1.0

     
  • Xavier Hourcade

    Xavier Hourcade - 2011-03-06

    Thanks for the patch cr1st1, but I won't find any soon, the time I would need to make an intelligent use of it ^^
    I could however, report quite fast against any new trunk revision.

    If it helps, yesterday I also managed to report the oops here:
    https://bugzilla.redhat.com/show_bug.cgi?id=682459
    (kerneloops.org is either under trouble, or not designed to offer any public tracking)

     
  • cristi

    cristi - 2011-03-06

    xaho - I'm not sure I'm following what you're saying.
    If you look at the provided patch - which fixes problem with 2 concurrent accesses to the webcam, you'll see it is pretty simple to even manually edit the involved files.
    I tried the patch on svn trunk rev 101 - and it applies ok.

    And the test program is 15 lines c/c++ program - no need to run 2 skype programs.

     
  • Xavier Hourcade

    Xavier Hourcade - 2011-03-06

    cr1st1, I wasn't quite following myself either :)

    Anyway, YES I could apply your patch to my rev.99 and YES I can confirm that my kernel won't crash any more.
    (( and your changes do look logical... even to me :D I learned something ))
    Thanks a lot, it's great.

    Please remember, I could only build rev.99, still to date (as I explained here and at redhat's bugzilla).
    I'll attach my patch file for this rev if it helps anyone else (different line numbers of course).

    I'm happy to try out any subsequent trunk revision, until one can build against Fedora's latest stable kernel.
    Then we can close this bug, pointing users to "the new revision that rocks".

    Cheers.
    Xav

     
  • Xavier Hourcade

    Xavier Hourcade - 2011-03-06

    Patch to rev.99 of the trunk

     

Log in to post a comment.