Archivo por meses: octubre 2012

Truco: Solucionar error rtorrent en Raspberry Pi

Estos días atrás estuve trasteando, al fin, con mi Raspberry Pi.

El puente y el post que Javier Pastor publicó en su blog, Incognitosis, me animó a dedicar un rato a montar el Raspberry Pi con un cliente Torrent, además de un MySQL para usarlo como pequeño (muy pequeño) servidor casero.

Pero tras ponerlo en funcionamiento, aprovechando un viejo disco por USB de 2.5″ que tenía por casa, terminé encontrándome con un problema al cabo de un tiempo, que provocaba que el cliente de Torrent (rtorrent) terminase fallando.

rtorrent: page allocation failure: order:3, mode:0x20

Con el problema añadido de dejar el fichero de sesiones bloqueado y no permitiendo que el script de reinicio pudiese volver a arrancarlo.

Tras investigar un poco, encontré un foro donde un usuario indicaba que el problema parecía estar en la activación (en el fichero de configuración .rtorrent.rc) del uso de DHT.

Así que ayer procedí a cambiarlo y hoy he podido comprobar, tras más de 24h encendido, que de momento el problema no se ha vuelto a reproducir.

Por cierto, acaban de anunciar que el modelo B de Raspberry Pi ha sufrido una ampliación de RAM de los 256MB a los 512MB, manteniendo el precio de 35$, lo que lo hace aún más apetecible.

Actualización: pues el error se ha reproducido, es menos habitual pero aún hay fallos. Toca seguir investigando.

 

Edito: 06 noviembre 2012

Tras investigar un poco por los foros de Raspberry, el error apunta a un problema en el kernel de linux que estamos usando o un problema con los drivers USB, que provocaría un error ante condiciones de carga de CPU y uso intensivo del disco duro:

Kernel paging error during heavy network and disk load

 

I have an external, self powered 300gb NTFS drive mounted using ntfs-3g to /mnt/sda1. I am also running rtorrent in a background screen session using the recommended init.d startup script. rtorrent is configured to use ~/rtorrent/watch and ~/rtorrent/session as it’s watch and session directories (which are located on the sd card), and /mnt/sda1/rtorrent/downloads as the primary download directory.

After 30 mins or so of downloading a single torrent at ~1MB/s,
the Raspi crashes and I get the message:

Unable to handle kernel paging request at virtual address 8e78b8a2
pgd =cb9e4000
*pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT
Entering kdb (current0xca4ec520, pid 1313 Oops: (null) due to oops @ 0xc024d3d4

Incluso algún usuario apuntaba al modo ‘Turbo’ habilitado en la última versión, que haría que se usara más CPU para mejorar el tráfico de red:

setting to stabilize the official image

Please add «smsc95xx.turbo_mode=N» to /boot/cmdline.txt in the official image, it prevents the rpi from crashing under load.
Also prevents the log from filling with this:

CODE: SELECT ALL

smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped

by El_Presidente » Thu Aug 16, 2012 5:13 pm
OK – so I’ve done my own Googling and find that the turbo mode is meant to make the Ethernet more efficient but at the cost of using more Kernel memory. Putting this together with comments from around the Pi forum, it looks like the turbo mode grabs too much resource when heavily using the network, leading to kevent drops and page allocation issues. Others believe that because the Ethernet is effectively a port off the USB 3-port hub built into the Pi, it is flooding the whole USB subsystem, thus being a contributor to overall crap USB experience as well as kernel panic/crash.

Lo cierto es que con unas opciones u otras los errores se siguen produciendo, aunque al menos en esta última ocasión parece que con modo turbo anulado ha sido más estable y ha aguantado más tiempo en ejecución.