Openmoko Bug #1837: atd issues
Openmoko Public Trac
bugs at docs.openmoko.org
Tue Aug 19 10:50:01 CEST 2008
#1837: atd issues
----------------------+-----------------------------------------------------
Reporter: h.koenig | Owner: openmoko-devel
Type: defect | Status: new
Priority: normal | Milestone:
Component: unknown | Version:
Severity: normal | Keywords:
Blockedby: | Reproducible:
Blocking: |
----------------------+-----------------------------------------------------
I'm using Om 2008.8 with zeckes -dev updates. playing with atd I noticed
1) atd does not remove scripts after execution
atd is a single shot timer, scripts should not run twice. but atd does
not remove them from /var/spool/at/ after execution. thus these scripts
will run over and over again once they are timed out, whenever atd gets
(re)started or triggered...
looking at the sources in atd-0.70-r4/atd/atd.c there is no remove/unlink
to the spool files.
to test:
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
cd /var/spool/at
cat >> 1.1 <<EOF
#!/bin/sh
date >> /tmp/at.run
echo >> /var/spool/at/trigger
EOF
chmod +x 1.1
echo >> /var/spool/at/trigger
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
2) /bin/bash atd scripts crash
using /bin/bash instead of /bin/sh in atd-scripts will crash
the script at startup before executing the first command in shell script,
using /bin/sh my atd scripts works (but I need some arithmetic and
"dc" frombusybox outputs time-in-secs as float -- but that's another
topic;)
from strace:
...
uname({sys="Linux", node="om-gta02", ...}) = 0
stat64("/", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
stat64("/", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("..", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("..", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
brk(0xbd000) = 0xbd000
getdents64(3, /* 3 entries */, 4096) = 72
lstat64("../at", {st_mode=S_IFDIR|0777, st_size=0, ...}) = 0
close(3) = 0
stat64("../..", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("../..", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 12 entries */, 4096) = 328
lstat64("../../spool", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
close(3) = 0
stat64("../../..", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("../../..", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
brk(0xc1000) = 0xc1000
getdents64(3, /* 19 entries */, 8192) = 488
lstat64("../../../var", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
close(3) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/1837>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the buglog
mailing list