oprofile script bug with used shell
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oprofile (Ubuntu) |
Fix Released
|
Medium
|
Luca Falavigna |
Bug Description
Binary package hint: oprofile
oprofile uses a control program thats written in sh (opcontrol) - this script uses:
#!/bin/sh
as the shell to run it was. Unfortunately this doesn't work well:
root@sun-
Using default event: CPU_CLK_
/usr/bin/opcontrol: 1: arith: syntax error: "NR_CHOSEN - 1"
No events given.
The code in question:
if test "$NR_CHOSEN" != 0; then
for f in `seq 0 $((NR_CHOSEN - 1))`; do
Now I'm not certain whether this is sh, bash or dash compliant, but inserting an "echo $NR_CHOSEN" beforehand shows this value to be 0. Somehow the evaluation isn't "right" with an out of the box gutsy/amd64 install when using /bin/sh -> /bin/dash. There's no oprofile running and I've not run it before so /etc/oprofile is empty.
Changing the shell to #!/bin/bash solves the problem.
Related branches
Changed in oprofile: | |
assignee: | nobody → dktrkranz |
importance: | Undecided → Medium |
status: | New → Confirmed |
This bug was fixed in the package oprofile - 0.9.3-1.1ubuntu1
---------------
oprofile (0.9.3-1.1ubuntu1) hardy; urgency=low
* Merge from debian unstable (LP: #179335), remaining changes: target= cell-be. patches/ opcontrol_ bashisms:
- Configuration file in /etc.
- On powerpc configure --with-
- Fix for seg fault in opreport when using --xml and --details.
- Change for opcontrol. Fix problem running on system using
a network file system with different time base.
- Change m4 file for SDK build process.
- Add changes to allow profiling of code that the SPU runtime
dynamically creates and runs on the stack.
* debian/
- fix bashisms in opcontrol script (LP: #172495)
oprofile (0.9.3-1.1) unstable; urgency=low
* NMU
* link libbfd static (closes: #446360)
-- Luca Falavigna <email address hidden> Sat, 22 Dec 2007 09:53:22 +0000