[jaunty] [TYPO in script - missing quote] line 81: unexpected EOF while looking for matching `"' /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux: line 84: syntax error: unexpected end of file.

Bug #368553 reported by Motin
22
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Fix Released
Medium
Martin Pitt
Jaunty
Fix Released
Medium
Martin Pitt
Karmic
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: hal

Hopefully this can be (or is already planned) to be included in a SRU:

--- /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux/hal-system-killswitch-get-power-linux 2009-04-28 13:46:30.000000000 +0200
+++ hal-system-killswitch-get-power-linux.patched 2009-04-28 13:49:10.000000000 +0200
@@ -61,7 +61,7 @@
     fi
 elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
     if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
- value="`hal-system-smbios --st_wwan`
+ value="`hal-system-smbios --st_wwan`"
  if [ "$value" = "0" ]; then
      exit 1
  elif [ "$value" = "1" ]; then

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: hal 0.5.12~rc1+git20090403-0ubuntu1 [modified: usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux]
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=sv_SE.UTF-8
SourcePackage: hal
Uname: Linux 2.6.28-11-generic i686

SRU impact: Regression from Ubuntu 8.10, breaks kill switches on Dells.

Patch: http://launchpadlibrarian.net/27490169/hal-system-killswitch-get-power-linux.patch (applied to already existing 87_standalone_smbios.patch which introduced the error in the first place); not an upstream problem, and not relevant to karmic any more since 87_standalone_smbios.patch was dropped completely (2.6.30 kernel supports Dell killswitches properly).

Regression potential: Current script is totally broken due to syntax errors, so it can't get worse. No other changes outside of /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux; hal package was recently built in jaunty-proposed and verified successfully, thus toolchain changes didn't happen in between. Regression potential is very low.

Revision history for this message
Motin (motin) wrote :
Matt Zimmerman (mdz)
Changed in hal (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in hal (Ubuntu Jaunty):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
importance: Undecided → Medium
status: New → Triaged
Changed in hal (Ubuntu Karmic):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Changed in hal (Ubuntu Jaunty):
assignee: Canonical Desktop Team (canonical-desktop-team) → Till Kamppeter (till-kamppeter)
Changed in hal (Ubuntu Karmic):
assignee: Canonical Desktop Team (canonical-desktop-team) → Till Kamppeter (till-kamppeter)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

AFAIK pitti is our master of the HAL, reassigning ...

I only maintain the HAL script for the printers which is part of hal-cups-utils.

Changed in hal (Ubuntu Karmic):
assignee: Till Kamppeter (till-kamppeter) → Martin Pitt (pitti)
Changed in hal (Ubuntu Jaunty):
assignee: Till Kamppeter (till-kamppeter) → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Hey Motin, thanks for discovering this! Do you know what the visible effect of that is? I take it that it breaks your particular type of killswitch? (I remember that more general bug a few days ago).

Can you please do "lshal > /tmp/hal.txt" and attach that here, as a reference? Thank you!

Changed in hal (Ubuntu Karmic):
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in Karmic branch. I'll do the Jaunty SRU once I get some more information from Fredrik, see comment 3.

Changed in hal (Ubuntu Karmic):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hal - 0.5.12~rc1+git20090406.46dc48-2ubuntu2

---------------
hal (0.5.12~rc1+git20090406.46dc48-2ubuntu2) karmic; urgency=low

  * 03_standalone_smbios.patch: Fix typo in Dell "wwan" killswitch type
    handling, thanks to Fredrik Motin! (LP: #368553)

 -- Martin Pitt <email address hidden> Tue, 28 Apr 2009 16:43:15 +0200

Changed in hal (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Setting to incomplete until information from comment 3 arrives.

Changed in hal (Ubuntu Jaunty):
status: Triaged → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who is affected by this who could give some further information about this problem?

Revision history for this message
atany (ye-gorshkov) wrote :

Attaching lshal output.

I've noticed this typo on my Dell XPS M1330 running Jaunty after a system crash. The system became unresponsive after Gimp asked to allocate memory for a 400+Mb file. Then applets (NM and blueman installed from PPA) start crashing and I had to kill X with magic SysRq and reboot.

For reference this is what was in my .xsession-errors file:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 76, in hal_name_owner_changed
    self.__enumerate()
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 88, in __enumerate
    self.state &= sw.GetPower()
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 55, in GetPower
    return self.__switch.GetPower()
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.Hal.Device.UnknownError: /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-li
nux: line 81: unexpected EOF while looking for matching `"'
 /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux: line 84: syntax error: unexpected end of file
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 93, in apport_excepthook
    os.O_WRONLY|os.O_CREAT|os.O_EXCL), 'w')
OSError: [Errno 13] Permission denied: '/var/crash/_usr_bin_blueman-applet.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 76, in hal_name_owner_changed
    self.__enumerate()
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 88, in __enumerate
    self.state &= sw.GetPower()
  File "/usr/lib/python2.6/dist-packages/blueman/main/KillSwitch.py", line 55, in GetPower
    return self.__switch.GetPower()
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.Hal.Device.UnknownError: /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux: line 81: unexpected EOF while looking for matching `"'
 /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux: line 84: syntax error: unexpected end of file

Revision history for this message
Martin Pitt (pitti) wrote :

Atany, does it break your killswitch on your system?

Revision history for this message
atany (ye-gorshkov) wrote :

Martin, it worked fine some time before, but now it is not. I'm not sure when exactly it stopped working as I rarely turn off wi-fi.
Switching off wireless disconnects from the network, but NM still constantly tries to connect to the network.

Attached is an obvious patch which fixes the issue.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, so it is a regression then. Would you be able to test a package in jaunty-proposed?

tags: added: regression-release
Changed in hal (Ubuntu Jaunty):
status: Incomplete → In Progress
Revision history for this message
atany (ye-gorshkov) wrote :

Yes, I have jaunty-proposed enabled and can test a package once the update is available.
Currently, the only available version of hal is 0.5.12~rc1+git20090403-0ubuntu1. I'm running amd64.

Revision history for this message
Motin (motin) wrote :

Hey, I haven't been in to check in here for a while. The visible result was that before the fix, the wireless would not activate itself automatically after switching on and off the killswitch. It didn't fix the issue of activating if the killswitch was enabled before suspend, though. But one less regression is good as well.

Attaching hal.txt, though it should be identical to the one attached above from an XPS 1330.

Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded, waiting for Steve or Colin to process.

description: updated
Changed in hal (Ubuntu Jaunty):
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

Accepted into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
atany (ye-gorshkov) wrote :

Thanks for fixing the issue.

With the latest update in proposed the killswitch on my system (Dell XPS M1330, Jaunty amd64) works fine, no errors reported and the wireless is deactivated and activated automatically when switching killswitch off and on.

Though, as Motin already mentioned, if killswitch is turned on while the laptop is suspended the Network Manager reports 'device not ready' after wake up despite the wireless interface is working (as reported by iwconfig/iwlist utilities). Restarting the Network Manager helps in this case. But I think this is not directly related to the issue tracked here and a new bug report should probably be opened.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hal - 0.5.12~rc1+git20090403-0ubuntu3

---------------
hal (0.5.12~rc1+git20090403-0ubuntu3) jaunty-proposed; urgency=low

  * 87_standalone_smbios.patch: Fix typos which caused Dell wifi killswitches
    to not work any more. (LP: #368553)

 -- Martin Pitt <email address hidden> Thu, 11 Jun 2009 13:54:34 +0200

Changed in hal (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Martin:

After installing this latest patch, my WiFi STOPPED working, saying something like
"iwlagn: rfkill switch must be turned off" in dmesg (alltough the rfkill switch definitely is ON)

I am sorry but cannot reproduce the correct message, since I reinstalled the whole system from scratch and applied all the available updates one by one in order to isolate the problem. My situation is as follows:
I installed Ubuntu Jaunty (64bit) from the live cd on a brand new Dell Vostro 1520.
Everything worked fine, including WiFi. Then I applied all available updates, and after rebooting, the wireless access did not work anymore.

So I decided to reinstall the system again and applying updates one by one. Now I have applied all of them (with wifi still working), except the following:
hal
libhal-storage1
libhal1

The currently installed version is 0.5.12~rc1+git20090403-0ubuntu1, the updated version would be 0.5.12~rc1+git20090403-0ubuntu3 for those 3 packages. If you can you point me to the source repository or to a description of the changes made, I could try to fix the problem and tell you what was wrong with the update.

One final question: is there any possibility to "revert back" from an updated package to an earlier version?

Revision history for this message
Daniel Cardin (daniel-cardin) wrote :

Gerhard,

I have submitted a bug report for the same problem you have encountered and can also confirm the problem lies with the last update to hal.

You can force a specific version in synaptic using the ctrl-e key on the specific package. It will provide you with a dropdown list of the two availables choices (ubuntu 1 and ubuntu3).

Hope this helps.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 368553] Re: [jaunty] [TYPO in script - missing quote] line 81: unexpected EOF while looking for matching `"' /usr/lib/hal/scripts/linux/hal-system-killswitch-get-power-linux: line 84: syntax error: unexpected end of file.

Hello Gerhard,

Gerhard Radatz [2009-06-20 16:24 -0000]:
> After installing this latest patch, my WiFi STOPPED working, saying something like
> "iwlagn: rfkill switch must be turned off" in dmesg (alltough the rfkill switch definitely is ON)

You mean the switch is off, and wifi should be on? What happens if you
switch it the other way round?

> The currently installed version is 0.5.12~rc1+git20090403-0ubuntu1, the
> updated version would be 0.5.12~rc1+git20090403-0ubuntu3 for those 3
> packages. If you can you point me to the source repository or to a
> description of the changes made

The patch is attached to this bug, and the full package change is

http://launchpadlibrarian.net/27776744/hal_0.5.12%7Erc1%2Bgit20090403-0ubuntu2_0.5.12%7Erc1%2Bgit20090403-0ubuntu3.diff.gz

It only changed the shell script which gets installed as
/usr/lib/hal/scripts/hal-system-killswitch-get-power-linux, so if you
want to hack on this, you don't even need to change packages, you can
just edit it inline.

> I could try to fix the problem and tell you what was wrong with the
> update.

Thanks for having a look!

> One final question: is there any possibility to "revert back" from an
> updated package to an earlier version?

Yes. You could e. g. downgrade hal to the jaunty final version with

  sudo apt-get install hal/jaunty

The other packages like libhal* can stay updated.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Hello Martin,

the problem seems to be as follows: after your corrections the script finally works. Before, it always yielded an exit code != 0, because of the syntax errors.

Now, I tracked down the problem by printing more logs. It turns out, that

hal-system-smbios --st_wlan

always yields "1" as the result, regardless of the position of the rfkill switch. Thus, the script always exits with 0, which apparently is wrong.

Revision history for this message
Simos Xenitellis  (simosx) wrote :

I confirm the comment by Gerhard that

sudo /usr/lib/hal/hal-system-smbios --st_wlan

returns always 1, irrespective of the position of thh rfkill switch.

Other users affected,
http://ubuntuforums.org/showthread.php?p=7549951#post7549951

Revision history for this message
Simos Xenitellis  (simosx) wrote :

Added report ""hal-system-smbios --st_wlan" reports rfkill switch always on, nm-applet always disabled (wireless, dell laptops)",
https://bugs.edge.launchpad.net/ubuntu/+source/hal/+bug/394663
on this issue.

This issue about the typo has been fixed, exposing the bug in hal-system-smbios.

Revision history for this message
bluishgreen (gsn-coldfire) wrote :

This is just to confirm that on DELL 1720 the patch does not work. I reverted back to hal - 0.5.12~rc1+git20090403-0ubuntu2 for now. hal - 0.5.12~rc1+git20090403-0ubuntu3 is still nuking the WIFI. I am just a regular end user and not able to provide any other specific bug details other than that I have been very very frustrated over the past week. But if you post some instructions regarding what you want to see from my config I shall be happy to do so.

Revision history for this message
Jaume Sala (jaumesala) wrote :

Same problem here. Dell Vostro 1520 with ubuntu 9.04 amd64

After hal update "0.5.12~rc1+git20090403-0ubuntu3" my wifi stopped working.
Solved downgrading to "0.5.12~rc1+git20090403-0ubuntu1".

With the downgrade Network-manager still shows wifi networks after switching off but can't connect. Switching on again everything works perfect.

With latest update "hal-0.5.12 -XXXX-ubuntu3" killswitch don't do anything (only leds turn on and off)

If I can do anything to help, contact me!

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for spotting. So it seems that the "wwan" side of the fix was confirmed to work, but we should disable the "wlan" bit again, since it causes this regression.

I apologize for this regression, it's unfortunate that this didn't turn up during testing -proposed.

tags: added: regression-updates
Changed in hal (Ubuntu Jaunty):
importance: Medium → Critical
status: Fix Released → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Mario, subscribing you FYI. It seems that the st_wlan counterpart of the previous standalone app doesn't work. However, apparently the killswitch worked fine before, so perhaps these models were already handled by the kernel's rfkill framework. I'm going to disable this part for now.

tags: removed: regression-release
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, using bug 394663 for tracking the regression fix instead.

Changed in hal (Ubuntu Jaunty):
importance: Critical → Medium
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.