Page 1 of 1

logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Tue Feb 18, 2020 12:49 pm
by agrohe21
I have installed Gargoyle 1.12 on a new device, wrt32x and see many strange entries in the logread output. Also the webui seems to lag at the time when many of these exist in the log.

Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
Tue Feb 18 10:45:21 2020 daemon.err uhttpd[3040]: sh: write error: Broken pipe
root@Gargoyle:~# logread |grep "Broken pipe" |wc -l
679

Is 679 of these events normal? I dont see any other posts with uhttpd 3040 errrors. or at least the forum search wont find them for me.

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Tue Feb 18, 2020 4:28 pm
by Lantis
It's fine. It means there is some code that could be cleaned up or rewritten, but it is not doing anything harmful or unexpected.

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Tue Feb 18, 2020 9:37 pm
by CBx86
If want know whats wrong going on run:

Code: Select all

for x in /etc/config/*; do uci -q show "${x#/etc/config/}" >/dev/null || echo "$x "; done
This will check every config. Whats is missing.

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Tue Feb 18, 2020 11:31 pm
by agrohe21
thanks.

when I run that as-is, it throws everything into dev null and I dont see it. Instead of dev null, I sent it to a file in ~ dir. This was the contents. Not sure what this means as I have wifi turned off and using Orbi as my APs.

would love to clean up those entries in the log even if harmless.

wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.channel='36'
wireless.radio0.hwmode='11a'
wireless.radio0.path='soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
wireless.radio0.htmode='VHT80'
wireless.radio1=wifi-device
wireless.radio1.type='mac80211'
wireless.radio1.channel='11'
wireless.radio1.hwmode='11g'
wireless.radio1.path='soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
wireless.radio1.htmode='HT20'

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Wed Feb 19, 2020 1:06 am
by Lantis
CBx86 wrote:If want know whats wrong going on run:

Code: Select all

for x in /etc/config/*; do uci -q show "${x#/etc/config/}" >/dev/null || echo "$x "; done
This will check every config. Whats is missing.
The issue is not with a uci config syntax error. Or am i misunderstanding what your script detects?

It's just a broken pipe. You can read about them and if you can figure out which commands are generating them and add a workaround, i'd be very happy to accept a patch.

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Wed Feb 19, 2020 9:17 am
by agrohe21
The question/issue is how to determine which options to use for the -i parameter. I assumed that the names of the files were the right options, but as you indicated, those are not.

I think I am good now but the 1440 minutes seems to be slowing down my gargoyle so may need something in between 15 and 1440. May 60 is more reasonable. then a cron command to pull this off every hour would work.

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Sat Feb 22, 2020 8:12 am
by ektus
Lantis wrote:
Tue Feb 18, 2020 4:28 pm
It's fine. It means there is some code that could be cleaned up or rewritten, but it is not doing anything harmful or unexpected.
Other than spamming the logfile with bogus entries, deleting older, but probably more interesting ones prematurely. My definition of "not harmful" seems to be slightly different ;)

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Sat Feb 22, 2020 5:26 pm
by agrohe21
I agree. Is there a setting to increase the log size to minimize this? Is there a recommended Max size?

Re: logread shows many entries uhttpd[3040]: sh: write error: Broken pipe

Posted: Sun Feb 23, 2020 7:50 am
by ektus
Where does the broken pipe message originate? Would it be feasible to change that piece of code in a way to print this message only with a higher than standard log level?