maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia 770 (https://talk.maemo.org/forumdisplay.php?f=24)
-   -   seat belt prevents crashes (https://talk.maemo.org/showthread.php?t=10317)

smackpotato 2007-10-07 22:23

seat belt prevents crashes
 
I have just released a small script on maemo garage called "seat belt" for the nokia 770. Seat belt changes the way memory is alocaded making more use of caches and swap. it takes less risk when allocatng. Seat belt prevents crashes of the browser and other programs. there is no deb yet so it will take a little work to install
please try it and don't be afraid to give me your opinion
thankyou

fpp 2007-10-08 09:59

Re: seat belt prevents crashes
 
It's difficult to find things on Garage. Could you provide a link ?

fpp 2007-10-08 13:49

Re: seat belt prevents crashes
 
Okay, the announcement has appeared on the Garage home page. Can the script be tested by running it with sudo in xterm or does it only take effect when run at boot time ?

buggsy2 2007-10-08 15:48

Re: seat belt prevents crashes
 
I installed it on my 770 with OS2007HE, ran your test, it's working. I'll report back in a day or two.

smackpotato 2007-10-08 16:24

Re: seat belt prevents crashes
 
2fpp here is the link https://garage.maemo.org/projects/seatbelt/
sure you can run it anytime from root . the changes will be lost after you reeboot. this may be the best way if you just want to experment

fpp 2007-10-08 19:20

Re: seat belt prevents crashes
 
Right, thanks. That's what I'm doing right now, looks good ; if there are no visible side effects I'll add it at boot time.

Maybe I'm being over-cautious, but as always this sort of "magic bullet" always begs the question : why isn't it the default in the first place ? :-)

tso 2007-10-08 19:45

Re: seat belt prevents crashes
 
not enough knowhow from the techs working on the firmware?

fpp 2007-10-08 19:47

Re: seat belt prevents crashes
 
...or maybe over-caution on their side too ? :-)

ericdkirk 2007-10-23 20:43

Re: seat belt prevents crashes
 
smackpotato is there any hope of getting deb for this?
Are the people using this finding that it does indeed make apps more stable?
I would love to install this on my 770 HE but i am really wary of the terminal since I had to reflash last time i got playing in it.

smackpotato 2007-10-23 21:21

Re: seat belt prevents crashes
 
I will try to mke a deb later on. it will take some time as i dont know how its done.
I can tell you this does make the browsers a lot more stable. the only bad part is objects are more readily swapped. it takes a few ticks to load the keyboard if you have not accessed it in a while

smackpotato 2007-10-25 21:16

Re: seat belt prevents crashes
 
2 ericdkirk. I've finally made a deb for the seatbelt script. its available here
https://garage.maemo.org/projects/seatbelt/. have fun and be prepared to have the browsers on the 770 run for hours instead of minutes without a crash

debernardis 2007-10-27 16:46

Re: seat belt prevents crashes
 
Will it benefit the n800 too or its magic swappiness is pleonastic for that?

smackpotato 2007-10-27 18:42

Re: seat belt prevents crashes
 
you could experment with swappiness and get back to me
cat /proc/sys/vm/swappiness to see the value
echo 50 > /proc/sys/vm/swappiness
to change it from 1 to 100. the nokia 770 was set to 1 most systems are set at 60
my script sets it at 100 . the script sets a couple of other values as well thanks..
if programs are crashing lots set it higher . If programes that have been idle for a while are slow to respond set it lower. thanks

Ray 2007-11-03 23:59

Re: seat belt prevents crashes
 
Quote:

Originally Posted by smackpotato (Post 87102)
... I've finally made a deb for the seatbelt script. its available here
https://garage.maemo.org/projects/seatbelt/. have fun and be prepared to have the browsers on the 770 run for hours instead of minutes without a crash

What happens after installation?

Where can I find the actual script?

Or does the installation add the settings to the startup sequence?

Thanks for your help.

Ray

bholzman 2007-11-06 21:57

Re: seat belt prevents crashes
 
Can anyone comment on whether this program is effective (besides the developer)?

ericdkirk 2007-11-07 15:39

Re: seat belt prevents crashes
 
I can vouch that installed on the newest OS2007HE it has stabilized my browsing, no more crashes unless I it a crazy flash site. But I just leave flash off anyway.

tso 2007-11-08 02:15

Re: seat belt prevents crashes
 
will this work on the latest official 2006 also?

ericdkirk 2007-11-08 02:28

Re: seat belt prevents crashes
 
should since, I think, it changes system variables. You could install it and see what happens, then report back.

tso 2007-11-08 02:32

Re: seat belt prevents crashes
 
will do, if i ever get my 770 out of wsod state...

racky 2007-11-08 06:53

Re: seat belt prevents crashes
 
I installed it, the system was more stable. But when I were playing the movies by using canola, the movies were kind of jerky. I uninstalled the program, and the problem is gone. Any idea?

smackpotato 2007-11-08 07:38

Re: seat belt prevents crashes
 
thanks for the feedback racky. yes the extra stability does come at a cost of slower operation of large programes. you could try downloading the source and try tuning it to your liking . there are only 3 variables and you can google for ther purpose.

smackpotato 2007-11-08 07:46

Re: seat belt prevents crashes
 
2 ray. the script runs at startup you can check if its working by the following command
cat /proc/sys/vm/swappiness it should echo 100

Ray 2007-11-09 03:29

Re: seat belt prevents crashes
 
Hello smackpotato,

many thanks for your reply.

Actually swappiness echoes 100 on my 770, so the script seems to have set the vars, right?

I haven't done 'hardcore burn-in' tests yet, but I surely could live with a somewhat slower but stable 770;-)

After installation of seatbelt, the built-in Opera crashed once so far while trying to open a link from within a 'Spiegel' article (www.spiegel.de)

A later call of that same sublink worked fine, though.

This will give new hope for my 'good old' 770...

Thanks

Ray

Drewvt 2007-11-09 14:30

Re: seat belt prevents crashes
 
Seems a great addition, but it sounds like it will probably slow down Mplayer, which I use very often.

Personally I find that Opera is much more likely to crash if you have put the 700 to sleep and woken it up again a few times. Therefore, a complete reboot once every day is not just good memory-discipline, it significantly cuts down the number of browser crashes.

dburr10085 2007-11-09 15:40

Re: seat belt prevents crashes
 
will this impede mapper?

tso 2007-11-09 21:28

Re: seat belt prevents crashes
 
Quote:

Originally Posted by Drewvt (Post 92594)
Seems a great addition, but it sounds like it will probably slow down Mplayer, which I use very often.

Personally I find that Opera is much more likely to crash if you have put the 700 to sleep and woken it up again a few times. Therefore, a complete reboot once every day is not just good memory-discipline, it significantly cuts down the number of browser crashes.

just watch out for that wsod...

Drewvt 2007-11-10 11:06

Re: seat belt prevents crashes
 
Quote:

Originally Posted by tso (Post 92829)
just watch out for that wsod...

I already had a WSOD. :)

(It happened when I took out the battery, during a crash when it would not reboot and I got frustrated with pushing the buttons to make it reboot. Needless to say, I never take out the battery anymore.)

Frank Banul 2007-11-10 14:09

Re: seat belt prevents crashes
 
I tried seatbelt and honestly didn't notice any difference in stability.

On Wednesday, I installed a patched wireless driver. See https://bugs.maemo.org/show_bug.cgi?id=2006. Since then the three applications that usually crashed for me have not (browser, mediaplayer and claws-mail).

The original wireless driver overwrites 2 bytes of memory with 0 on every wireless use.

To try this out, download the patched driver, https://bugs.maemo.org/attachment.cgi?id=594

With root access
rmmod cx3110x
insmod ./cx3110x-on-stack.ko
chroot /mnt/initfs wlan-cal

If you want to make this permanent, you can create a script to do this on boot.

/etc/init.d/wlan-fix contains
#! /bin/sh
#

if [ -f /usr/local/bin/cx3110x-on-stack.ko ]
then
rmmod cx3110x
insmod /usr/local/bin/cx3110x-on-stack.ko
chroot /mnt/initfs wlan-cal
fi

Then create a link in /etc/rc2.d/S80wlanfix to /etc/init.d/wlan-fix

In /etc/rc2.d/ ln -s ../init.d/wlan-fix S80wlanfix

Hope this helps.

Frank

smackpotato 2007-11-10 17:40

Re: seat belt prevents crashes
 
2Frank do you know if the hackers edition still has this bug

Frank Banul 2007-11-10 19:25

Re: seat belt prevents crashes
 
The hacker edition does have the bug to my understanding, the bug was just recently fixed though, it's possible that future versions may incorporate the change.

Frank

Ray 2007-11-11 00:19

Re: seat belt prevents crashes
 
As a normal user, how can I check whether the proposd fix/patch is active and working?

Thanks

Ray

Frank Banul 2007-11-11 01:50

Re: seat belt prevents crashes
 
You can tell if the patched driver is installed by running /sbin/lsmod

The size of the original cx3110x driver is 51420.
The size of the patched cx3110x driver is 51580.

Frank

Ray 2007-11-11 13:48

Re: seat belt prevents crashes
 
Quote:

Originally Posted by Frank Banul (Post 93007)
[..]
If you want to make this permanent, you can create a script to do this on boot.

/etc/init.d/wlan-fix contains
#! /bin/sh
#

if [ -x /usr/local/bin/cx3110x-on-stack.ko ]
then
rmmod cx3110x
insmod /usr/local/bin/cx3110x-on-stack.ko
chroot /mnt/initfs wlan-cal
fi



Then create a link in /etc/rc2.d/S80wlanfix to /etc/init.d/wlan-fix

In /etc/rc2.d/ ln -s S80wlanfix ../init.d/wlan-fix

Hope this helps.

Frank

When trying to create the link, the terminal responds with a 'File exists' error message.
For this as root I went to /etc/rc2.d , then entered 'ln - s S80wlanfix ../init.d/wlan-fix' .

The result: No link will be created.

The script wlan-fix itself, which I created in /etc/init.d/ , works fine when called manually on the cmd line.

What went wrong?


Thanks

Ray

fanoush 2007-11-11 14:20

Re: seat belt prevents crashes
 
the 'ln' line is wrong, swap arguments, it is 'ln -s original newlink'

also it is better to use -f in the test, -x is true only if the file has x bit set which may not be true for kernel module file (depends on how you downloaded/copied it to the device)

Ray 2007-11-11 16:49

Re: seat belt prevents crashes
 
Quote:

Originally Posted by fanoush (Post 93256)
the 'ln' line is wrong, swap arguments, it is 'ln -s original newlink'

also it is better to use -f in the test, -x is true only if the file has x bit set which may not be true for kernel module file (depends on how you downloaded/copied it to the device)

Thanks for the hint.
I swapped arguments, and the link file was created.
To be sure, I also replaced the -x with a -f in the script.

This time the script was executed at startup,
or more exactly, the patched driver was loaded:-)

Now let's hope the browser won't crash anymore;-)


Many thanks to all people involved in solving this annoying problem.

Regards

Raymond

Ron G 2007-11-11 20:32

Re: seat belt prevents crashes
 
I also noticed that video playback is choppier with seat belt (swappiness=100) than without it (swappiness=1).

Is there a WLAN driver bug thread on itt? I searched but didn't find one. Is this WLAN driver patch still preliminary? Should I wait for an official bug fix announcement before installing the WLAN driver patch?

Thanks,
Ron G

fanoush 2007-11-11 21:27

Re: seat belt prevents crashes
 
Quote:

Originally Posted by Ron G (Post 93338)
Is there a WLAN driver bug thread on itt? I searched but didn't find one.

Not yet.
Quote:

Originally Posted by Ron G (Post 93338)
Is this WLAN driver patch still preliminary?

Yes it the sense that easy to install deb package is currently missing and that there are still a few additional things worth of fixing. But even the current fix should stop the random memory corruption from occurring. Those additional things are more about making it more failproof in various corner cases (which may or may not occur in reality) and later possibly also about improving data transfer speed and error recovery.
Quote:

Originally Posted by Ron G (Post 93338)
Should I wait for an official bug fix announcement before installing the WLAN driver patch?

Official from Nokia? Well, that could take a while :-) We'll see.

Semi-official from community? Well if you can install it with the information in this thread and in the bug report then go ahead. If not then wait few days for easy to install deb package doing similar fix as mentioned in this thread.

Gomez 2008-08-06 07:56

Re: seat belt prevents crashes
 
If I'll install seatbelt_1.0.0_all.deb, need I re-install it after reboot or pofer off?

briand 2008-08-06 11:57

Re: seat belt prevents crashes
 
holy time warp, batman!


All times are GMT. The time now is 23:07.

vBulletin® Version 3.8.8