Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: BUG stale lock: Unable find Teensy Loader. Is the Teensy Loader application running?

  1. #1

    BUG stale lock: Unable find Teensy Loader. Is the Teensy Loader application running?

    On linux, arduino-1.8.8-teensyduino-1.45, my teensy was working until today when I kept getting
    Opening Teensy Loader...
    Unable find Teensy Loader. (p) Is the Teensy Loader application running?

    I restarted arduino-teensy, still no dice.
    Then I tried to start /var/local/arduino-teensy/hardware/tools/teensy and it exited right away.

    Strace finally gave me the clue:
    stat("/tmp/instance-Teensy-merlin", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
    getuid() = 500
    openat(AT_FDCWD, "/tmp/instance-Teensy-merlin", O_RDONLY) = 5
    read(5, "4512\0", 256) = 5
    kill(4512, SIG_0) = 0
    close(5) = 0
    getpid() = 19478
    exit_group(4294967295) = ?

    saruman:/var/local/arduino-teensy/hardware/tools$ cat /tmp/instance-Teensy-merlin
    4512

    I didn't have anything with that PID, but eventually I just ran
    saruman:/var/local/arduino-teensy/hardware/tools$ rm /tmp/instance-Teensy-merlin

    and now things work again.
    Stale lock file code seems buggy, but even then, checking that the PID exists doesn't mean anything, another process could just use it if you're not lucky
    Is it possible to try talking to the arduino gateway code and just remove the lockfile if it's stale?

  2. #2
    Junior Member
    Join Date
    Apr 2019
    Posts
    10
    Could you specify which arguments you put with strace? if you can recall...

  3. #3
    Quote Originally Posted by VascoSampaio View Post
    Could you specify which arguments you put with strace? if you can recall...
    I don't, but typically I run
    strace -s 256 -f -p <pid>
    or
    strace -s 256 -f program
    If I only want fileio, I add -etrace=file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •