Streaming hangs on raspi camera v2, rpi 3 b+

What is the problem?

When using the streaming URL, I get no output in the browser .. it just seems to wait indefinitely.

Snapshots work. raspivid and raspistill work.

I also occasionally am getting kernel stack traces on the rpi if I let the browser sit for long enough. I don't think this is the root cause -- this may be an after effect:

[  991.665459] Unable to handle kernel NULL pointer dereference at virtual address 00000028
[  991.671783] pgd = 8d5ac000
[  991.677693] [00000028] *pgd=2d8f8835, *pte=00000000, *ppte=00000000
[  991.683974] Internal error: Oops: 17 [#1] SMP ARM
[  991.690023] Modules linked in: xt_tcpudp iptable_mangle xt_DSCP cmac bnep hci_uart bluetooth ecdh_generic evdev brcmfmac brcmutil cfg80211 snd_bcm2835(C) rfkill snd_pcm snd_timer snd fixed uio_pdrv_genirq uio ip_tables x_tables ipv6
[  991.703799] CPU: 1 PID: 634 Comm: mjpg_streamer Tainted: G         C      4.14.27-v7+ #1100
[  991.710696] Hardware name: BCM2835
[  991.717548] task: 8d5a6900 task.stack: 8c860000
[  991.724421] PC is at tcp_push+0x44/0x148
[  991.731310] LR is at tcp_sendmsg_locked+0x308/0xdfc
[  991.738236] pc : [<806ce054>]    lr : [<806d1620>]    psr: 40000013
[  991.745187] sp : 8c861d78  ip : 8cc5267c  fp : 8c861d9c
[  991.752241] r10: 8cf9ea80  r9 : ffffffe0  r8 : 8cc5267c
[  991.759277] r7 : 00000000  r6 : 0000ffcb  r5 : 00000000  r4 : 8cc52580
[  991.766522] r3 : 00000000  r2 : 0000ffcb  r1 : 00000000  r0 : 8d59c900
[  991.773684] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  991.777192] Control: 10c5383d  Table: 0d5ac06a  DAC: 00000055
[  991.780479] Process mjpg_streamer (pid: 634, stack limit = 0x8c860210)

What did you already try to solve it?

I started with 2018-03-19_2018-03-13-octopi-stretch-lite-0.15.0.zip that supports the b+.

I originally had issues detecting a camera so started trying some various things based on suggestions I found in google:

I changed this:

$ grep gpu /boot/config.txt 
gpu_mem=256

I also explicitly set the camera to raspi:

$ grep -v ^# /boot/octopi.txt 
camera="raspi"

I also did an apt-get update then apt-get upgrade. I ran raspi-config to make sure the camera was enabled. I also ran rpi-update to update firmware.

At this point, I was able to get raspistill and raspivid to work (if I stopped the webcamd - some of the steps above were done because I didn't realize I needed to stop webcamd to get raspstill to work.)

I am able to get a static image through http://10.13.54.180:8080/?action=snapshot

A streaming image from http://10.13.54.180:8080/?action=stream just sort of hangs in the browser. If I kill webcamd, I end up with a static image on the browser. If I curl the same URL I do get a constant stream of bits.

Here's what is actually running:


β”œβ”€webcamd,431 /root/bin/webcamd
  β”‚   └─mjpg_streamer,448 -o output_http.so -w ./www-octopi -n -i input_raspicam.so -fps 10
  β”‚       β”œβ”€{HCEC Notify},454
  β”‚       β”œβ”€{HDispmanx Notif},452
  β”‚       β”œβ”€{HTV Notify},453
  β”‚       β”œβ”€{VCHIQ completio},451
  β”‚       β”œβ”€{mjpg_streamer},449
  β”‚       β”œβ”€{mjpg_streamer},450
  β”‚       β”œβ”€{mjpg_streamer},633
  β”‚       β”œβ”€{mjpg_streamer},927
  β”‚       β”œβ”€{vc.ril.camera},455
  β”‚       β”œβ”€{vc.ril.image_en},467
  β”‚       └─{vc.ril.video_re},456

The log...

Starting up webcamDaemon...

--- Configuration: ----------------------------
camera:        raspi
usb options:   -r 640x480 -f 10
raspi options: -fps 10
http options:  -w ./www-octopi -n
-----------------------------------------------

<13>Mar 20 04:41:42 pi: Starting Raspberry Pi camera
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so -fps 10
MJPG Streamer Version: git rev: 8cc9d22c1e79905d529a248ccf05bbf0625e0bf3
 i: fps.............: 10
 i: resolution........: 640 x 480
 i: camera parameters..............:

Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
 o: www-folder-path......: ./www-octopi/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: (null)
 o: username:password....: disabled
 o: commands.............: disabled
 i: Starting Camera
Encoder Buffer Size 81920

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

Not connected to a printer. OctoPrint 1.3.6 running on OctoPi 0.15.0.

Told Guy about that, he added it to the official ticket on the current 0.15 nightlies (which you probably want to follow):

Thanks -- am already following that github issue -- wasn't sure if it was me or related to B+/0.15 -- I guess I should continue over there?

Probably better for now to continue over there, considering that 0.15 is only available in nightly build form so far and we are still in this "what works and what doesn't and needs a fix" phase with the B+

Is there a specific place you are tracking "what does and doesn't work with B+" ?

I'm having the same issue. I manually installed OctoPrint though, 1.3.7rc3.

The ticket in the OctoPi tracker that I linked up there is the specific tracking place.