Prints crashing on raspberry pi.

I keep having prints crash when using the raspberry pi.  I have reimaged the card, tried different cards, tried different power supplies, and tried two different raspberry pi's.  It seems to happen at randomly they all have been at different points during the print.  I have captured a log of the lastest print to crash: https://drive.google.com/file/d/0B1DusAxeMw1TNFlKS2NsMEtDeVk/view?usp=sharing

-Rob

Comments

  • It is serial communication that breaks. Port stays connected but does not transfer any data. This is often a problem with bad power stability on 5V from the board. You could try an active powered usb hub, a more stable main power for printer or a better usb cable if it is interference on usb cable.

    If you have repetier-firmware you can try a data transfer only test. Send
    M111 S24
    and it will only run communication, no execution. Then printing is fast as it only sends data and you will most probably see it succeed as motors and heaters are all without power and do not cause voltage to change during print.
  • As far as I can tell it must be a bug in the RPI kernel.  I have tried many iterations from hub to no hub and directly attached.  I have tried two RP3's with different power adapters and pi and printers on completely different circuits.  I have tried using the prebuilt image to installing everything on raspbian and I still get crashing.  I have no issue if I attach the printers to a hub and use a 5 meter usb cable to my desktop running Repetier Server.

    When it does fail I see this or something similar in the kernel logs retrieved with dmesg:
    B0: ftdi_set_termios urb failed to set baudrate
    [155675.158775] ftdi_sio ttyUSB0: urb failed to clear flow control
    [155676.158780] ftdi_sio ttyUSB0: ftdi_set_termios urb failed to set baudrate
    [155681.158746] ftdi_sio ttyUSB0: urb failed to clear flow control
    [155687.018833] ftdi_sio ttyUSB0: ftdi_set_termios urb failed to set baudrate
    [155692.018851] ftdi_sio ttyUSB0: urb failed to clear flow control
    [155702.018899] cdc_acm 1-1.3.1.4:1.0: failed to set dtr/rts
    [155707.018908] cdc_acm 1-1.3.1.4:1.0: failed to set dtr/rts
    [155712.118933] cdc_acm 1-1.5:1.0: failed to set dtr/rts
    [155717.118943] cdc_acm 1-1.5:1.0: failed to set dtr/rts


    If I remove and reinsert the usb devices in the pi they don't re-enumerate it requires a reboot to get the server to enumerate the printers again.

    For now I can use the PI act as a remote terminal for the server on my desktop.

    Best Regards,
    Rob
  • You also need to unpower the printer if you unplug usb to get a new port. That is why I think that it is the usb converter on arduino board that crashes. Seems like that chip is ot as stable as the main AVR.

    With hub it is important to use a ctive one (with power) also with good Pi power I can use it without hub as well. Problem is that some usb cables that power pi are too thin dropping voltage or 5V units do not send full 5V. So if you can measure voltage on pi without anything else connected. Pi is also very sensitive on voltage. If you use original pi image you would often see the rainbow on hdmi output to indicate low voltage (our image has this disabled).
  • Here is an update..   I have been able to work around the buggy USB stack on the PI.  It was actually my cameras that were crashing the USB stack on the pi not the printers.  Anyways to work around the issue I added the following to the command line of the kernel:

    dwc_otg.otg_cap=2 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3 dwc_otg.lpm_enable=0

    I don't know which specific option fixed my previous problem.

    Now I have a new issue.  Repetier Server crashed during a print and won't restart.  

    Here is a capture of the logs:
    Repetier Server log:
    2017-02-10 20:10:21: Start logging...
    2017-02-10 20:10:21: Webdirectory: /usr/local/Repetier-Server/www/
    2017-02-10 20:10:21: Storage directory: /var/lib/Repetier-Server/
    2017-02-10 20:10:21: Configuration file: /usr/local/Repetier-Server/etc/RepetierServer.xml
    2017-02-10 20:10:21: Directory for temporary files: /tmp/
    2017-02-10 20:10:21: Reading firmware data ...
    2017-02-10 20:10:21: Starting Network ...
    2017-02-10 20:10:21: Active features:4095
    2017-02-10 20:10:21: Reading printer configurations ...
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Prusa_I3_MK2.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Prusa_I3_MK2
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Tevo_Black_Widow.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Tevo_Black_Widow
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Monoprice_Maker_Ultimate.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:21: Starting printer threads ...
    2017-02-10 20:10:21: Starting printer thread for Prusa_I3_MK2
    2017-02-10 20:10:21: Starting printer thread for Tevo_Black_Widow
    2017-02-10 20:10:21: Starting printer thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:21: Starting work dispatcher subsystem ...
    2017-02-10 20:10:21: Starting user database ...
    2017-02-10 20:10:21: Initalizing LUA ...
    2017-02-10 20:10:21: Register LUA cloud services
    2017-02-10 20:10:21: add Repetier-Renderer
    2017-02-10 20:10:21: LUA initalization finished.
    2017-02-10 20:10:21: Starting web server ...
    2017-02-10 20:10:21: Work dispatcher thread started.
    2017-02-10 20:10:21: Webserver started.
    2017-02-10 20:10:21: Start logging...
    2017-02-10 20:10:21: Webdirectory: /usr/local/Repetier-Server/www/
    2017-02-10 20:10:21: Storage directory: /var/lib/Repetier-Server/
    2017-02-10 20:10:21: Configuration file: /usr/local/Repetier-Server/etc/RepetierServer.xml
    2017-02-10 20:10:21: Directory for temporary files: /tmp/
    2017-02-10 20:10:21: Reading firmware data ...
    2017-02-10 20:10:21: Starting Network ...
    2017-02-10 20:10:21: Active features:4095
    2017-02-10 20:10:21: Reading printer configurations ...
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Prusa_I3_MK2.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Prusa_I3_MK2
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Tevo_Black_Widow.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Tevo_Black_Widow
    2017-02-10 20:10:21: Reading printer config /var/lib/Repetier-Server/configs/Monoprice_Maker_Ultimate.xml
    2017-02-10 20:10:21: Starting printjob manager thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:21: Starting printer threads ...
    2017-02-10 20:10:21: Starting printer thread for Prusa_I3_MK2
    2017-02-10 20:10:21: Starting printer thread for Tevo_Black_Widow
    2017-02-10 20:10:21: Starting printer thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:21: Starting work dispatcher subsystem ...
    2017-02-10 20:10:21: Starting user database ...
    2017-02-10 20:10:21: Initalizing LUA ...
    2017-02-10 20:10:21: Register LUA cloud services
    2017-02-10 20:10:21: add Repetier-Renderer
    2017-02-10 20:10:21: LUA initalization finished.
    2017-02-10 20:10:21: Starting web server ...
    2017-02-10 20:10:21: Work dispatcher thread started.
    2017-02-10 20:10:21: Webserver started.
    2017-02-10 20:10:22: Start logging...
    2017-02-10 20:10:22: Webdirectory: /usr/local/Repetier-Server/www/
    2017-02-10 20:10:22: Storage directory: /var/lib/Repetier-Server/
    2017-02-10 20:10:22: Configuration file: /usr/local/Repetier-Server/etc/RepetierServer.xml
    2017-02-10 20:10:22: Directory for temporary files: /tmp/
    2017-02-10 20:10:22: Reading firmware data ...
    2017-02-10 20:10:22: Starting Network ...
    2017-02-10 20:10:22: Active features:4095
    2017-02-10 20:10:22: Reading printer configurations ...
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Prusa_I3_MK2.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Tevo_Black_Widow.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Monoprice_Maker_Ultimate.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting printer threads ...
    2017-02-10 20:10:22: Starting printer thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Starting printer thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Starting printer thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting work dispatcher subsystem ...
    2017-02-10 20:10:22: Starting user database ...
    2017-02-10 20:10:22: Initalizing LUA ...
    2017-02-10 20:10:22: Register LUA cloud services
    2017-02-10 20:10:22: add Repetier-Renderer
    2017-02-10 20:10:22: LUA initalization finished.
    2017-02-10 20:10:22: Starting web server ...
    2017-02-10 20:10:22: Work dispatcher thread started.
    2017-02-10 20:10:22: Webserver started.
    2017-02-10 20:10:22: Start logging...
    2017-02-10 20:10:22: Webdirectory: /usr/local/Repetier-Server/www/
    2017-02-10 20:10:22: Storage directory: /var/lib/Repetier-Server/
    2017-02-10 20:10:22: Configuration file: /usr/local/Repetier-Server/etc/RepetierServer.xml
    2017-02-10 20:10:22: Directory for temporary files: /tmp/
    2017-02-10 20:10:22: Reading firmware data ...
    2017-02-10 20:10:22: Starting Network ...
    2017-02-10 20:10:22: Active features:4095
    2017-02-10 20:10:22: Reading printer configurations ...
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Prusa_I3_MK2.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Tevo_Black_Widow.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Monoprice_Maker_Ultimate.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting printer threads ...
    2017-02-10 20:10:22: Starting printer thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Starting printer thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Starting printer thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting work dispatcher subsystem ...
    2017-02-10 20:10:22: Starting user database ...
    2017-02-10 20:10:22: Initalizing LUA ...
    2017-02-10 20:10:22: Register LUA cloud services
    2017-02-10 20:10:22: add Repetier-Renderer
    2017-02-10 20:10:22: LUA initalization finished.
    2017-02-10 20:10:22: Starting web server ...
    2017-02-10 20:10:22: Work dispatcher thread started.
    2017-02-10 20:10:22: Webserver started.
    2017-02-10 20:10:22: Start logging...
    2017-02-10 20:10:22: Webdirectory: /usr/local/Repetier-Server/www/
    2017-02-10 20:10:22: Storage directory: /var/lib/Repetier-Server/
    2017-02-10 20:10:22: Configuration file: /usr/local/Repetier-Server/etc/RepetierServer.xml
    2017-02-10 20:10:22: Directory for temporary files: /tmp/
    2017-02-10 20:10:22: Reading firmware data ...
    2017-02-10 20:10:22: Starting Network ...
    2017-02-10 20:10:22: Active features:4095
    2017-02-10 20:10:22: Reading printer configurations ...
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Prusa_I3_MK2.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Tevo_Black_Widow.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Reading printer config /var/lib/Repetier-Server/configs/Monoprice_Maker_Ultimate.xml
    2017-02-10 20:10:22: Starting printjob manager thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting printer threads ...
    2017-02-10 20:10:22: Starting printer thread for Prusa_I3_MK2
    2017-02-10 20:10:22: Starting printer thread for Tevo_Black_Widow
    2017-02-10 20:10:22: Starting printer thread for Monoprice_Maker_Ultimate
    2017-02-10 20:10:22: Starting work dispatcher subsystem ...
    2017-02-10 20:10:22: Starting user database ...
    2017-02-10 20:10:22: Initalizing LUA ...
    2017-02-10 20:10:22: Register LUA cloud services
    2017-02-10 20:10:22: add Repetier-Renderer
    2017-02-10 20:10:22: LUA initalization finished.
    2017-02-10 20:10:22: Starting web server ...
    2017-02-10 20:10:22: Work dispatcher thread started.
    2017-02-10 20:10:22: Webserver started.

    syslog:
    Feb 10 20:10:21 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:21 systemd[1]: Started Repetier-Server 3D Printer Server.
    Feb 10 20:10:21 systemd[1]: RepetierServer.service: main process exited, code=killed, status=6/ABRT
    Feb 10 20:10:21 systemd[1]: Unit RepetierServer.service entered failed state.
    Feb 10 20:10:21 systemd[1]: RepetierServer.service has no holdoff time, scheduling restart.
    Feb 10 20:10:21 systemd[1]: Stopping Repetier-Server 3D Printer Server...
    Feb 10 20:10:21 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:21 systemd[1]: Started Repetier-Server 3D Printer Server.
    Feb 10 20:10:21 systemd[1]: RepetierServer.service: main process exited, code=killed, status=6/ABRT
    Feb 10 20:10:21 systemd[1]: Unit RepetierServer.service entered failed state.
    Feb 10 20:10:21 systemd[1]: RepetierServer.service has no holdoff time, scheduling restart.
    Feb 10 20:10:21 systemd[1]: Stopping Repetier-Server 3D Printer Server...
    Feb 10 20:10:21 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Started Repetier-Server 3D Printer Server.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service: main process exited, code=killed, status=6/ABRT
    Feb 10 20:10:22 systemd[1]: Unit RepetierServer.service entered failed state.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service has no holdoff time, scheduling restart.
    Feb 10 20:10:22 systemd[1]: Stopping Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Started Repetier-Server 3D Printer Server.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service: main process exited, code=killed, status=6/ABRT
    Feb 10 20:10:22 systemd[1]: Unit RepetierServer.service entered failed state.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service has no holdoff time, scheduling restart.
    Feb 10 20:10:22 systemd[1]: Stopping Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Started Repetier-Server 3D Printer Server.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service: main process exited, code=killed, status=6/ABRT
    Feb 10 20:10:22 systemd[1]: Unit RepetierServer.service entered failed state.
    Feb 10 20:10:22 systemd[1]: RepetierServer.service has no holdoff time, scheduling restart.
    Feb 10 20:10:22 systemd[1]: Stopping Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: Starting Repetier-Server 3D Printer Server...
    Feb 10 20:10:22 systemd[1]: RepetierServer.service start request repeated too quickly, refusing to start.
    Feb 10 20:10:22 systemd[1]: Failed to start Repetier-Server 3D Printer Server.
    Feb 10 20:10:22 systemd[1]: Unit RepetierServer.service entered failed state.


    What else can I check or try to get it running again?

    -Rob
  • Looks like the normal initalization finished and then it crashes. First see if

    sudo service RepetierServer status

    returns any hint.

    What could be is that it starts a job from a damaged  database so deletesudo rm /var/lib/Repetier-Server/database/workdispatcher.sql

    and try restart. That database gets recreated on startup so deleting it is no problem.
    If it does not help start it manually
    sudo /usr/local/Repetier-Server/bin/RepetierServer -c /usr/local/Repetier-Server/etc/RepetierServer.xml
    and see if output say more then stopped at the end. If no new info try
    sudo strace /usr/local/Repetier-Server/bin/RepetierServer -c /usr/local/Repetier-Server/etc/RepetierServer.xml

    that shows a lot of things going on and should give us an idea what it tries before crashing. What I think is that at least one file is defect on sd card and reading that causes a crash.

  • Here is another update.  I think I have a clue to what was crashing repetier-server.  BTW I did have to delete the workdispatcher.sql file to get the server running again.

    After I deleted the database file I started repetier-server manually and left the console running while I went about my business printing.  After a couple of prints it happened again.  The server crashed and wouldn't restart.  I looked at the console I had left open and looked at the error:
    LUA job rendering.render#{"id":1,"image":"/var/lib/Repetier-Server/printer/Original_Prusa_I3_MK2/jobs/00000001_30MM C_l.png","layer":"/var/lib/Repetier-Server/printer/Original_Prusa_I3_MK2/jobs/00000001_30MM C.layer","list":"jobs","slug":"Original_Prusa_I3_MK2"}
    cloudinitalize:application/json
    get 00000001_30MM C_l.png status 200
    contenttype:application/json
    error rendering over cloud
    Reading configuration file ...
    Input file /var/lib/Repetier-Server/printer/Original_Prusa_I3_MK2/jobs/00000001_30MM C.layer not found!

    I have my pi setup to use my desktop help with processing the preview images.  Well the preview failed and I got the error about a missing file.

    I ran an strace and the last few lines of the output:

    write(6, "2017-03-09 12:31:40: Register LU"..., 49) = 49
    write(1, "Register LUA cloud services\n", 28Register LUA cloud services
    ) = 28
    gettimeofday({1489087900, 58002}, NULL) = 0
    stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2427, ...}) = 0
    gettimeofday({1489087900, 58287}, NULL) = 0
    lseek(6, 0, SEEK_CUR)                   = 903917
    write(6, "2017-03-09 12:31:40: add Repetie"..., 43) = 43
    write(1, "add Repetier-Renderer\n", 22add Repetier-Renderer
    ) = 22
    stat64("/var/lib/Repetier-Server/database/renderer.json", {st_mode=S_IFREG|0666,                                                      st_size=1211, ...}) = 0
    stat64("/var/lib/Repetier-Server/printer/Original_Prusa_I3_MK2/models/00000001_3                                                     0mm cube.layer", {st_mode=S_IFREG|0666, st_size=1373148, ...}) = 0
    stat64("/var/lib/Repetier-Server/printer/Original_Prusa_I3_MK2/models/00000001_3                                                     0mm cube_l.png", {st_mode=S_IFREG|0666, st_size=244698, ...}) = 0
    gettimeofday({1489087900, 59853}, NULL) = 0
    stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2427, ...}) = 0
    gettimeofday({1489087900, 60219}, NULL) = 0
    lseek(6, 0, SEEK_CUR)                   = 903960
    write(6, "2017-03-09 12:31:40: LUA initali"..., 49) = 49
    write(1, "LUA initalization finished.\n", 28LUA initalization finished.
    ) = 28
    stat64("", 0x7eee01b0)                  = -1 ENOENT (No such file or directory)
    mmap2(NULL, 8388608, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|M                                                     AP_STACK, -1, 0) = 0x73d00000
    mprotect(0x73d00000, 4096, PROT_NONE)   = 0
    clone(Work dispatcher thread started.
     <unfinished ...>
    +++ killed by SIGABRT +++

    I deleted the workdispatcher.sql and I was up and running again.  I removed the link to my desktop computer for rendering previews and so far I have ran a couple of weeks worth of prints without issue where I would see the crash every day or two.

    -Rob



  • So it must be one of the jobs in workdispatcher that caused the crashing. In some older version it could happen that to many easy tasks started at once if you have may gcodes and that caused problems in the end. Maybe something like this happened and with your delete it does not try to do it again. When updating it might want to recompute elverything if equations have changed or new computations were added.
Sign In or Register to comment.