Re: AW: Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV

2021-02-22 Thread Wagner, Patrick




We can probably get rid of the tempory debug output code, can't we?

-Patrick

On 22.02.2021 13:17, s...@acts.hu wrote:



Hello,

thank you for both of your feedbacks. As much as I dislike systemd,
it allows you to restart piler-smtp in case it crashes. But hopefully
it won't happen in the future after this fix.

Also I've merged it to the master branch, and I'll release a bugfix
version 1.3.11, and I'll make a deb package.

Janos


On 2021-02-22 12:11, claudio.schnelldasi...@manrolandgoss.com wrote:

Janos, Patrick,

thanks for this. I also run piler on Ubuntu 18.04 and ran into the 
same issue.

My 'solution' was to start piler-smtp automatically via monitoring if
it goes down :-(.

Janos, I wonder if you will provide updated .deb packages for 
dpkg-installs?


Thanks and regards,
Claudio

-Ursprüngliche Nachricht-
Von: Wagner, Patrick 
Gesendet: Montag, 22. Februar 2021 12:01
An: Piler User 
Betreff: Re: Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV



Thanks Janos,

I'd updated and replaced the piler-smtp binary on 2021-02-16, and
while I can see that my monitoring still shows SMTP timeouts on the
piler port sometimes between 02:30 and 02:40, no further outright
crashes / SIGSEGV occur, so archiving continues without any need to
restart the process manually.


- Patrick

On 15.02.2021 21:49, s...@acts.hu wrote:



Hello Patrick,

thank you for your feedback. I'd like you to update the smtpsegv
branch, and recompile piler-smtp. I've refactored the timeout checks,
and pushed the commit to the branch on bitbucket.

Janos


On 2021-02-15 14:34, Wagner, Patrick wrote:

Hello Janos,


happened Sa->So this time.


Logs (piler-smtp as compiled out of smtpsegv.tar.gz source code) see
below, SIGSEGV follows right after free(session) done.

It is also interesting to see that the piler daemon finishes
processing a message 2 whole minutes after the smtp process has
already segfaulted and and stopped supplying any new messages.


Thanks, Patrick



Feb 14 02:29:59 hostname piler-smtp[19066]: connected from
192.168.165.154:9501 on fd=6 (active connections: 1) Feb 14 02:29:59
hostname piler-smtp[19066]: received:
Q056C70SAJJT9OFH, from=, size=4944, client=192.168.165.154, fd=6,
fsync=1831
Feb 14 02:29:59 hostname piler-smtp[19066]: disconnected from
192.168.165.154 on fd=6, slot=0, reason=done (0 active connections)
Feb 14 02:29:59 hostname piler-smtp[19066]: free_smtp_session() Feb
14 02:29:59 hostname piler-smtp[19066]: SSL_shutdown() Feb 14
02:29:59 hostname piler-smtp[19066]: SSL_free() Feb 14 02:29:59
hostname piler-smtp[19066]: SSL_CTX_free Feb 14 02:29:59 hostname
piler-smtp[19066]: freeing session Feb 14 02:29:59 hostname
piler-smtp[19066]: free(session) done Feb 14 02:30:00 hostname
piler[19070]: 1/Q056C70SAJJT9OFH:
400060287d2205ab9b5400229f77e67a, size=4944/1928, attachments=0,
reference=, message-id=<4DdV5z0DlSz 5vfP@mailrelay.intern>,
retention=7350, folder=0, delay=0.0425, status=stored Feb 14 02:30:01
hostname CRON[7835]: (piler) CMD (/usr/bin/find /var/www/piler/tmp
-type f -name i.\* -exec rm -f {} \;) Feb 14 02:30:01 hostname
CRON[7836]: (piler) CMD (/usr/bin/find /var/piler/error -type f|wc -l
> /var/piler/stat/error) Feb 14 02:30:01 hostname CRON[7842]: (piler)
CMD (/usr/bin/indexer --quiet note1 --rotate) Feb 14 02:30:01
hostname CRON[7837]: (piler) CMD (/usr/bin/indexer --quiet tag1
--rotate) Feb 14 02:30:01 hostname CRON[7838]: (piler) CMD
(/usr/local/libexec/piler/indexer.main.sh)
Feb 14 02:30:01 hostname CRON[7833]: (CRON) info (No MTA installed,
discarding output) Feb 14 02:30:01 hostname CRON[7832]: (CRON) info
(No MTA installed, discarding output) Feb 14 02:30:01 hostname piler:
INDEXER INFO: merging to main started Feb 14 02:30:40 hostname
piler-smtp[19066]: connected from
192.168.165.252:37934 on fd=6 (active connections: 1) Feb 14 02:30:41
hostname piler-smtp[19066]: connected from
192.168.165.252:37936 on fd=9 (active connections: 2) Feb 14 02:30:41
hostname piler-smtp[19066]: disconnected from
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)
Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session() Feb
14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown() Feb 14
02:30:41 hostname piler-smtp[19066]: SSL_free() Feb 14 02:30:41
hostname piler-smtp[19066]: SSL_CTX_free Feb 14 02:30:41 hostname
piler-smtp[19066]: freeing session Feb 14 02:30:41 hostname
piler-smtp[19066]: free(session) done Feb 14 02:30:41 hostname
piler-smtp[19066]: disconnected from
192.168.165.252 on fd=9, slot=1, reason=done (0 active connections)
Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session() Feb
14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown() Feb 14
02:30:41 hostname piler-smtp[19066]: SSL_free() Feb 14 02:30:41
hostname piler-smtp[19066]: SSL_CTX_free Feb 14 02:30:41 hostname
piler-smtp[19066]: freeing session Feb 14 02:30:41 hostname
piler-smtp[19066]: free(session) done Feb 14 02:31:44 hostname
piler-smtp[19066]: connected from
192

Re: Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV

2021-02-22 Thread Wagner, Patrick




Thanks Janos,

I'd updated and replaced the piler-smtp binary on 2021-02-16, and while 
I can see that my monitoring still shows SMTP timeouts on the piler port 
sometimes between 02:30 and 02:40, no further outright crashes / SIGSEGV 
occur, so archiving continues without any need to restart the process 
manually.



- Patrick

On 15.02.2021 21:49, s...@acts.hu wrote:



Hello Patrick,

thank you for your feedback. I'd like you to update the smtpsegv branch,
and recompile piler-smtp. I've refactored the timeout checks, and pushed
the commit to the branch on bitbucket.

Janos


On 2021-02-15 14:34, Wagner, Patrick wrote:

Hello Janos,


happened Sa->So this time.


Logs (piler-smtp as compiled out of smtpsegv.tar.gz source code) see
below, SIGSEGV follows right after free(session) done.

It is also interesting to see that the piler daemon finishes
processing a message 2 whole minutes after the smtp process has
already segfaulted and and stopped supplying any new messages.


Thanks, Patrick



Feb 14 02:29:59 hostname piler-smtp[19066]: connected from
192.168.165.154:9501 on fd=6 (active connections: 1)
Feb 14 02:29:59 hostname piler-smtp[19066]: received:
Q056C70SAJJT9OFH, from=, size=4944, client=192.168.165.154, fd=6,
fsync=1831
Feb 14 02:29:59 hostname piler-smtp[19066]: disconnected from
192.168.165.154 on fd=6, slot=0, reason=done (0 active connections)
Feb 14 02:29:59 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:29:59 hostname piler-smtp[19066]: freeing session
Feb 14 02:29:59 hostname piler-smtp[19066]: free(session) done
Feb 14 02:30:00 hostname piler[19070]: 1/Q056C70SAJJT9OFH:
400060287d2205ab9b5400229f77e67a, size=4944/1928, attachments=0,
reference=, message-id=<4DdV5z0DlSz
5vfP@mailrelay.intern>, retention=7350, folder=0, delay=0.0425, 
status=stored

Feb 14 02:30:01 hostname CRON[7835]: (piler) CMD (/usr/bin/find
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb 14 02:30:01 hostname CRON[7836]: (piler) CMD (/usr/bin/find
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb 14 02:30:01 hostname CRON[7842]: (piler) CMD (/usr/bin/indexer
--quiet note1 --rotate)
Feb 14 02:30:01 hostname CRON[7837]: (piler) CMD (/usr/bin/indexer
--quiet tag1 --rotate)
Feb 14 02:30:01 hostname CRON[7838]: (piler) CMD
(/usr/local/libexec/piler/indexer.main.sh)
Feb 14 02:30:01 hostname CRON[7833]: (CRON) info (No MTA installed,
discarding output)
Feb 14 02:30:01 hostname CRON[7832]: (CRON) info (No MTA installed,
discarding output)
Feb 14 02:30:01 hostname piler: INDEXER INFO: merging to main started
Feb 14 02:30:40 hostname piler-smtp[19066]: connected from
192.168.165.252:37934 on fd=6 (active connections: 1)
Feb 14 02:30:41 hostname piler-smtp[19066]: connected from
192.168.165.252:37936 on fd=9 (active connections: 2)
Feb 14 02:30:41 hostname piler-smtp[19066]: disconnected from
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)
Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:30:41 hostname piler-smtp[19066]: freeing session
Feb 14 02:30:41 hostname piler-smtp[19066]: free(session) done
Feb 14 02:30:41 hostname piler-smtp[19066]: disconnected from
192.168.165.252 on fd=9, slot=1, reason=done (0 active connections)
Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:30:41 hostname piler-smtp[19066]: freeing session
Feb 14 02:30:41 hostname piler-smtp[19066]: free(session) done
Feb 14 02:31:44 hostname piler-smtp[19066]: connected from
192.168.165.252:40584 on fd=6 (active connections: 1)
Feb 14 02:31:53 hostname piler-smtp[19066]: connected from
192.168.165.252:40586 on fd=9 (active connections: 2)
Feb 14 02:31:53 hostname piler-smtp[19066]: disconnected from
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)
Feb 14 02:31:53 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:31:53 hostname piler-smtp[19066]: freeing session
Feb 14 02:31:53 hostname piler-smtp[19066]: free(session) done
Feb 14 02:31:53 hostname piler-smtp[19066]: disconnected from
192.168.165.252 on fd=9, slot=1, reason=done (0 active connections)
Feb 14 02:31:53 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:31

Re: Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV

2021-02-15 Thread Wagner, Patrick




Hello Janos,


happened Sa->So this time.


Logs (piler-smtp as compiled out of smtpsegv.tar.gz source code) see 
below, SIGSEGV follows right after free(session) done.


It is also interesting to see that the piler daemon finishes processing 
a message 2 whole minutes after the smtp process has already segfaulted 
and and stopped supplying any new messages.



Thanks, Patrick



Feb 14 02:29:59 hostname piler-smtp[19066]: connected from 
192.168.165.154:9501 on fd=6 (active connections: 1)
Feb 14 02:29:59 hostname piler-smtp[19066]: received: Q056C70SAJJT9OFH, 
from=, size=4944, client=192.168.165.154, fd=6, fsync=1831
Feb 14 02:29:59 hostname piler-smtp[19066]: disconnected from 
192.168.165.154 on fd=6, slot=0, reason=done (0 active connections)

Feb 14 02:29:59 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:29:59 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:29:59 hostname piler-smtp[19066]: freeing session
Feb 14 02:29:59 hostname piler-smtp[19066]: free(session) done
Feb 14 02:30:00 hostname piler[19070]: 1/Q056C70SAJJT9OFH: 
400060287d2205ab9b5400229f77e67a, size=4944/1928, attachments=0, 
reference=, message-id=<4DdV5z0DlSz
5vfP@mailrelay.intern>, retention=7350, folder=0, delay=0.0425, 
status=stored
Feb 14 02:30:01 hostname CRON[7835]: (piler) CMD (/usr/bin/find 
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb 14 02:30:01 hostname CRON[7836]: (piler) CMD (/usr/bin/find 
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb 14 02:30:01 hostname CRON[7842]: (piler) CMD (/usr/bin/indexer 
--quiet note1 --rotate)
Feb 14 02:30:01 hostname CRON[7837]: (piler) CMD (/usr/bin/indexer 
--quiet tag1 --rotate)
Feb 14 02:30:01 hostname CRON[7838]: (piler) CMD 
(/usr/local/libexec/piler/indexer.main.sh)
Feb 14 02:30:01 hostname CRON[7833]: (CRON) info (No MTA installed, 
discarding output)
Feb 14 02:30:01 hostname CRON[7832]: (CRON) info (No MTA installed, 
discarding output)

Feb 14 02:30:01 hostname piler: INDEXER INFO: merging to main started
Feb 14 02:30:40 hostname piler-smtp[19066]: connected from 
192.168.165.252:37934 on fd=6 (active connections: 1)
Feb 14 02:30:41 hostname piler-smtp[19066]: connected from 
192.168.165.252:37936 on fd=9 (active connections: 2)
Feb 14 02:30:41 hostname piler-smtp[19066]: disconnected from 
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)

Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:30:41 hostname piler-smtp[19066]: freeing session
Feb 14 02:30:41 hostname piler-smtp[19066]: free(session) done
Feb 14 02:30:41 hostname piler-smtp[19066]: disconnected from 
192.168.165.252 on fd=9, slot=1, reason=done (0 active connections)

Feb 14 02:30:41 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:30:41 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:30:41 hostname piler-smtp[19066]: freeing session
Feb 14 02:30:41 hostname piler-smtp[19066]: free(session) done
Feb 14 02:31:44 hostname piler-smtp[19066]: connected from 
192.168.165.252:40584 on fd=6 (active connections: 1)
Feb 14 02:31:53 hostname piler-smtp[19066]: connected from 
192.168.165.252:40586 on fd=9 (active connections: 2)
Feb 14 02:31:53 hostname piler-smtp[19066]: disconnected from 
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)

Feb 14 02:31:53 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:31:53 hostname piler-smtp[19066]: freeing session
Feb 14 02:31:53 hostname piler-smtp[19066]: free(session) done
Feb 14 02:31:53 hostname piler-smtp[19066]: disconnected from 
192.168.165.252 on fd=9, slot=1, reason=done (0 active connections)

Feb 14 02:31:53 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_shutdown()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_free()
Feb 14 02:31:53 hostname piler-smtp[19066]: SSL_CTX_free
Feb 14 02:31:53 hostname piler-smtp[19066]: freeing session
Feb 14 02:31:53 hostname piler-smtp[19066]: free(session) done
Feb 14 02:32:40 hostname piler-smtp[19066]: connected from 
192.168.165.252:43330 on fd=6 (active connections: 1)
Feb 14 02:32:40 hostname piler-smtp[19066]: connected from 
192.168.165.252:43334 on fd=9 (active connections: 2)
Feb 14 02:32:40 hostname piler-smtp[19066]: disconnected from 
192.168.165.252 on fd=6, slot=0, reason=done (1 active connections)

Feb 14 02:32:40 hostname piler-smtp[19066]: free_smtp_session()
Feb 14 02:32:40 hostname 

Re: Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV

2021-02-10 Thread Wagner, Patrick




Hello Janos,


happened again, the same way, with the recompiled piler-smtp binary (git 
master).


~# piler-smtp -V
1.3.10 build 998

Feb 10 02:30:01 hostname CRON[8429]: (piler) CMD (/usr/bin/indexer 
--quiet note1 --rotate)
Feb 10 02:30:01 hostname CRON[8427]: (piler) CMD (/usr/bin/find 
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb 10 02:30:01 hostname CRON[8428]: (piler) CMD (/usr/bin/find 
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb 10 02:30:01 hostname CRON[8431]: (piler) CMD 
(/usr/local/libexec/piler/indexer.main.sh)
Feb 10 02:30:01 hostname CRON[8430]: (piler) CMD (/usr/bin/indexer 
--quiet tag1 --rotate)
Feb 10 02:30:01 hostname CRON[8424]: (CRON) info (No MTA installed, 
discarding output)
Feb 10 02:30:01 hostname CRON[8425]: (CRON) info (No MTA installed, 
discarding output)

Feb 10 02:30:01 hostname piler: INDEXER INFO: merging to main started
Feb 10 02:30:17 hostname piler-smtp[27596]: connected from 
192.168.165.252:57902 on fd=6 (active connections: 1)
Feb 10 02:30:17 hostname piler-smtp[27596]: connected from 
192.168.165.252:57908 on fd=9 (active connections: 2)
Feb 10 02:30:17 hostname piler-smtp[27596]: disconnected from 
192.168.165.252 on fd=6, slot=0 (1 active connections)
Feb 10 02:30:17 hostname piler-smtp[27596]: disconnected from 
192.168.165.252 on fd=9, slot=1 (0 active connections)
Feb 10 02:30:31 hostname piler-smtp[27596]: connected from 
192.168.165.154:32120 on fd=6 (active connections: 1)
Feb 10 02:31:47 hostname piler-smtp[27596]: received: ZQAHOOJ8RXM5NCHD, 
from=, size=4945, client=192.168.165.154, fd=6, fsync=75881359
Feb 10 02:31:47 hostname piler-smtp[27596]: client 192.168.165.154 
timeout, lasttime: 1612920631
Feb 10 02:31:47 hostname piler-smtp[27596]: disconnected from 
192.168.165.154 on fd=6, slot=0 (0 active connections)
Feb 10 02:31:47 hostname piler-smtp[27596]: got signal: 11, Segmentation 
fault

Feb 10 02:31:47 hostname piler-smtp[27596]: piler-smtp has been terminated
Feb 10 02:31:48 hostname piler[27599]: 0/ZQAHOOJ8RXM5NCHD: 
40006023378d2c9c99d400a51d237bc0, size=4945/1936, attachments=0, 
reference=, message-id=<4Db2JR32vQz5vS9@mailrelay.intern>, 
retention=7350, folder=0, delay=0.9705, status=stored


There were no changes to backup schedules recently, and no scheduled job 
or I/O heavy maintenance should happen, especially not at this point in 
time. Still, point taken, we will check whether there could be anything, 
but why would only 1-2 VMs out of hundreds be affected?


In any case, SIGSEGV still happens and my piler-smtp process is dead.

- Patrick

On 09.02.2021 09:04, s...@acts.hu wrote:



Hello Patrick,

I've been reported such issues when a backup system paused or froze
the virtual machine running piler. I suspect that it might be the
case for you based on the time and days you mentioned.

The problem in such cases is that piler-smtp is in the middle of
processing an email, then the system is frozen for a few minutes
enough to pass the smtp timeout limit (60 sec), and then when it's
unfrozen then piler-smtp notices the timeout situation, then tears
down the connection. However, at the end of the session it tries
to tear down the already terminated and freed connection data.

So, let's try the following: get the master branch, recompile piler,
however replace the piler-smtp binary only, nothing else. Then let's
see if the problem is solved.

Janos

On 2021-02-09 07:56, Wagner, Patrick wrote:

Hello everyone,

a few weeks ago 2 of our Piler instances began segfaulting - more
precisely, several times per month (but not every day night) at about
02:30 am local time the MS Exchange server that has the Piler instance
setup as journaling target connects to piler-smtp, upon which
piler-smtp segfaults after trying to store an email that clearly
doesn't get parsed correctly by piler-smtp as it is represented as
gibberish (and gibberish cannot be renamed...)

See below for a few of the latest examples. Interestingly, the SIGSEGV
did not happen Sunday and Monday night, meaning the day following a
non-weekday? Not going on long enough that I could call it a pattern,
but in any case it would be nice if piler-smtp didn't segfault in the
first place.

What can I do to supply more useful information to get this fixed? Or
has there been meaningful work on piler-smtp in the meantime that this
could / would've already been fixed?


Thanks, Patrick


Feb  4 02:30:01 hostname CRON[24428]: (piler) CMD (/usr/bin/find
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb  4 02:30:01 hostname CRON[24430]: (piler) CMD (/usr/bin/find
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb  4 02:30:01 hostname CRON[24429]: (piler) CMD
(/usr/local/libexec/piler/indexer.main.sh)
Feb  4 02:30:01 hostname CRON[24431]: (piler) CMD (/usr/bin/indexer
--quiet note1 --rotate)
Feb  4 02:30:01 hostname CRON[24436]: (piler) CMD (/usr/bin/indexer
--quiet tag1 --rotate)
Feb  4 02:30:01 hostname piler: INDEXER I

Piler 1.35 on Ubuntu 18.04 - piler-smtp SIGSEGV

2021-02-09 Thread Wagner, Patrick




Hello everyone,

a few weeks ago 2 of our Piler instances began segfaulting - more 
precisely, several times per month (but not every day night) at about 
02:30 am local time the MS Exchange server that has the Piler instance 
setup as journaling target connects to piler-smtp, upon which piler-smtp 
segfaults after trying to store an email that clearly doesn't get parsed 
correctly by piler-smtp as it is represented as gibberish (and gibberish 
cannot be renamed...)


See below for a few of the latest examples. Interestingly, the SIGSEGV 
did not happen Sunday and Monday night, meaning the day following a 
non-weekday? Not going on long enough that I could call it a pattern, 
but in any case it would be nice if piler-smtp didn't segfault in the 
first place.


What can I do to supply more useful information to get this fixed? Or 
has there been meaningful work on piler-smtp in the meantime that this 
could / would've already been fixed?



Thanks, Patrick


Feb  4 02:30:01 hostname CRON[24428]: (piler) CMD (/usr/bin/find 
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb  4 02:30:01 hostname CRON[24430]: (piler) CMD (/usr/bin/find 
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb  4 02:30:01 hostname CRON[24429]: (piler) CMD 
(/usr/local/libexec/piler/indexer.main.sh)
Feb  4 02:30:01 hostname CRON[24431]: (piler) CMD (/usr/bin/indexer 
--quiet note1 --rotate)
Feb  4 02:30:01 hostname CRON[24436]: (piler) CMD (/usr/bin/indexer 
--quiet tag1 --rotate)

Feb  4 02:30:01 hostname piler: INDEXER INFO: merging to main started
Feb  4 02:30:01 hostname CRON[24426]: (CRON) info (No MTA installed, 
discarding output)
Feb  4 02:30:01 hostname CRON[24425]: (CRON) info (No MTA installed, 
discarding output)
Feb  4 02:30:20 hostname piler-smtp[1144]: connected from 
192.168.165.252:58292 on fd=6 (active connections: 1)
Feb  4 02:30:20 hostname piler-smtp[1144]: connected from 
192.168.165.252:58294 on fd=9 (active connections: 2)
Feb  4 02:30:20 hostname piler-smtp[1144]: disconnected from 
192.168.165.252 on fd=6 (1 active connections)
Feb  4 02:30:20 hostname piler-smtp[1144]: disconnected from 
192.168.165.252 on fd=9 (0 active connections)
Feb  4 02:30:27 hostname piler-smtp[1144]: connected from 
192.168.165.154:41139 on fd=6 (active connections: 1)

Feb  4 02:32:18 hostname piler-smtp[1144]: client 192.168.165.154 timeout
Feb  4 02:32:18 hostname piler-smtp[1144]: disconnected from 
192.168.165.154 on fd=6 (0 active connections)

Feb  4 02:32:18 hostname piler-smtp[1144]: Removing 6KHX6ZMY7OD1R0KG
Feb  4 02:32:18 hostname piler-smtp[1144]: received: #013}^?, 
from=, size=4940, client=192.168.165.154, fd=6
Feb  4 02:32:18 hostname piler-smtp[1144]: ERROR: couldn't rename 
#013}^? to 2/ #013}^? (reason: no such file or directory)
Feb  4 02:32:18 hostname piler-smtp[1144]: got signal: 11, Segmentation 
fault

Feb  4 02:32:18 hostname piler-smtp[1144]: piler-smtp has been terminated

Feb  5 02:32:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:57818 on fd=6 (active connections: 1)
Feb  5 02:32:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:57820 on fd=9 (active connections: 2)
Feb  5 02:32:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=6 (1 active connections)
Feb  5 02:32:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=9 (0 active connections)
Feb  5 02:33:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:60458 on fd=6 (active connections: 1)
Feb  5 02:33:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:60460 on fd=9 (active connections: 2)
Feb  5 02:33:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=6 (1 active connections)
Feb  5 02:33:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=9 (0 active connections)
Feb  5 02:34:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:34840 on fd=6 (active connections: 1)
Feb  5 02:34:15 hostname piler-smtp[28329]: connected from 
192.168.165.252:34842 on fd=9 (active connections: 2)
Feb  5 02:34:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=6 (1 active connections)
Feb  5 02:34:15 hostname piler-smtp[28329]: disconnected from 
192.168.165.252 on fd=9 (0 active connections)
Feb  5 02:34:29 hostname piler-smtp[28329]: connected from 
192.168.165.154:25626 on fd=6 (active connections: 1)
Feb  5 02:35:01 hostname CRON[30058]: (piler) CMD (/usr/bin/find 
/var/piler/error -type f|wc -l > /var/piler/stat/error)
Feb  5 02:35:01 hostname CRON[30060]: (root) CMD (command -v debian-sa1 
> /dev/null && debian-sa1 1 1)
Feb  5 02:35:01 hostname CRON[30059]: (piler) CMD 
(/usr/local/libexec/piler/indexer.delta.sh)
Feb  5 02:35:01 hostname CRON[30063]: (piler) CMD (/usr/bin/find 
/var/www/piler/tmp -type f -name i.\* -exec rm -f {} \;)
Feb  5 02:35:01 hostname piler: INDEXER ERROR: indexer merging to main 
index is already running. It started at Fr 5. Feb 02:30:01 CET 

Re: Piler 1.3.5 on Ubuntu 18.04 WebUI doesn't render timestamped Mails

2020-10-17 Thread Wagner, Patrick




Thanks Janos,

I can confirm I can now read the stamped mails, your fix is working. 
Green checkmark "Mail is Verified" appears, along with message details 
and body.



- Patrick

On 17.10.2020 20:54, s...@acts.hu wrote:



Hello Patrick,

it seems that a few things have changed, so I've fixed the issue
to make the feature work again.

Please apply the following commits:

https://bitbucket.org/jsuto/piler/commits/4a131f3058766ecdeb3021f5478746f58938c2c8 

https://bitbucket.org/jsuto/piler/commits/427114b89202e3658664540e2eb5d30feeba659b 



OR

simply overwrite 
https://bitbucket.org/jsuto/piler/src/master/util/sign.php
and 
https://bitbucket.org/jsuto/piler/src/master/webui/system/helper/TrustedTimestamps.php

then add the following to /var/piler/www/config.php:
$config['TSA_VERIFY_CERTIFICATE'] = true;


Janos

PS: Thank you Frank for the freetsa.org hint. It works properly.


On 2020-10-17 12:45, Wagner, Patrick wrote:

Hello Janos,

I've changed the DECRYPT_ATTACHMENT_BINARY to pileraget and I've
re-read the two links you sent, but are not sure I could've missed
anything?

For the packaged 1.3.5 release, is there more to do than to add the
four TSA_XXX config lines and to add a regular cronjob to execute
sign.php as piler user?

"Something" is definitely happening, as I can read mails via web UI
just fine, until 500 non-stamped mails have been reached, where
suddenly a batch of 500 e-mails is no longer readable.

For what it's worth, here's my entry taken from the piler user crontab:

0 * * * *   /usr/bin/php /usr/libexec/piler/sign.php --webui
/var/piler/www --mode unit

And here's what happens if I run it manually:

piler@mypiler01:~$ /usr/bin/php /usr/libexec/piler/sign.php --webui
/var/piler/www --mode unit
PHP Warning:  Use of undefined constant COUNT - assumed 'COUNT' (this
will throw an Error in a future version of PHP) in
/usr/libexec/piler/sign.php on line 3
PHP Warning:  Use of undefined constant HASH_VALUE - assumed
'HASH_VALUE' (this will throw an Error in a future version of PHP) in
/usr/libexec/piler/sign.php on line 4
PHP Warning:  Use of undefined constant RESPONSE_STRING - assumed
'RESPONSE_STRING' (this will throw an Error in a future version of
PHP) in /usr/libexec/piler/sign.php on line 5
PHP Warning:  Use of undefined constant RESPONSE_TIME - assumed
'RESPONSE_TIME' (this will throw an Error in a future version of PHP)
in /usr/libexec/piler/sign.php on line 6
PHP Warning:  Use of undefined constant START_ID - assumed 'START_ID'
(this will throw an Error in a future version of PHP) in
/usr/libexec/piler/sign.php on line 7
PHP Warning:  Use of undefined constant STOP_ID - assumed 'STOP_ID'
(this will throw an Error in a future version of PHP) in
/usr/libexec/piler/sign.php on line 8

PHP Warning:  ini_set(): Headers already sent. You cannot change the
session module's ini settings at this time in
/var/piler/www/config.php on line 333
PHP Warning:  session_start(): Cannot start session when headers
already sent in /var/piler/www/system/request.php on line 30
piler@mypiler01:~$ echo $?
0

Should I be using a different PHP version or are those warnings to be 
expected?


FreeTSA should be available for your testing purposes.


Thanks,

Patrick

On 16.10.2020 21:19, s...@acts.hu wrote:



Hello Patrick,

for starters the DECRYPT_ATTACHMENT_BINARY should be pileraget (not 
pilerget).


Also it might be worth to go over the steps and check if everything 
is setup properly:


https://bitbucket.org/jsuto/piler/issues/480/support-rfc3161-trusted-timestamps 
https://www.mail-archive.com/piler-user@list.acts.hu/msg00785.html


In the meantime I try to find a TSA provider suitable for testing 
purposes.
If anyone on the list was familiar with any, or better could provide 
a test

account, it would be great.

Janos



On 2020-10-16 20:02, Patrick Wagner wrote:

Hello everyone,

we're testing the TSA signing feature of Piler. When I login as
auditor all mails are listed correctly in the Web GUI upper pane /
list. When I click on a mail the header and content are displayed
below if that mail was not signed (yet). Clicking on a signed mail
however does not refresh the lower pane and continues to display
either the last non-stamped mail or remains blank (if no mail had been
selected before). With pilerget on the CLI the mails are displayed
correctly.

What's wrong? Do I have to change any configuration?

I added these lines in config-site.php:
$config['TSA_PUBLIC_KEY_FILE'] = '/etc/piler/tsa.publickey.pem';
$config['TSA_START_ID'] = 1;
$config['TSA_STAMP_REQUEST_UNIT_SIZE'] = 500;
$config['TSA_URL'] = 'http://zeitstempel.dfn.de';

$config['DECRYPT_BINARY'] = '/usr/bin/pilerget';
$config['DECRYPT_ATTACHMENT_BINARY'] = '/usr/bin/pilerget';


Thanks,
Patrick

# piler -V
piler 1.3.5, build 997, Janos SUTO 

Build Date: Sun Apr 21 16:50:30 UTC 2019
ldd version: ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
gcc version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
OS: Linux 18

Re: Piler 1.3.5 on Ubuntu 18.04 WebUI doesn't render timestamped Mails

2020-10-17 Thread Wagner, Patrick




Hello Janos,

I've changed the DECRYPT_ATTACHMENT_BINARY to pileraget and I've re-read 
the two links you sent, but are not sure I could've missed anything?


For the packaged 1.3.5 release, is there more to do than to add the four 
TSA_XXX config lines and to add a regular cronjob to execute sign.php as 
piler user?


"Something" is definitely happening, as I can read mails via web UI just 
fine, until 500 non-stamped mails have been reached, where suddenly a 
batch of 500 e-mails is no longer readable.


For what it's worth, here's my entry taken from the piler user crontab:

0 * * * *   /usr/bin/php /usr/libexec/piler/sign.php --webui 
/var/piler/www --mode unit


And here's what happens if I run it manually:

piler@mypiler01:~$ /usr/bin/php /usr/libexec/piler/sign.php --webui 
/var/piler/www --mode unit
PHP Warning:  Use of undefined constant COUNT - assumed 'COUNT' (this 
will throw an Error in a future version of PHP) in 
/usr/libexec/piler/sign.php on line 3
PHP Warning:  Use of undefined constant HASH_VALUE - assumed 
'HASH_VALUE' (this will throw an Error in a future version of PHP) in 
/usr/libexec/piler/sign.php on line 4
PHP Warning:  Use of undefined constant RESPONSE_STRING - assumed 
'RESPONSE_STRING' (this will throw an Error in a future version of PHP) 
in /usr/libexec/piler/sign.php on line 5
PHP Warning:  Use of undefined constant RESPONSE_TIME - assumed 
'RESPONSE_TIME' (this will throw an Error in a future version of PHP) in 
/usr/libexec/piler/sign.php on line 6
PHP Warning:  Use of undefined constant START_ID - assumed 'START_ID' 
(this will throw an Error in a future version of PHP) in 
/usr/libexec/piler/sign.php on line 7
PHP Warning:  Use of undefined constant STOP_ID - assumed 'STOP_ID' 
(this will throw an Error in a future version of PHP) in 
/usr/libexec/piler/sign.php on line 8


PHP Warning:  ini_set(): Headers already sent. You cannot change the 
session module's ini settings at this time in /var/piler/www/config.php 
on line 333
PHP Warning:  session_start(): Cannot start session when headers already 
sent in /var/piler/www/system/request.php on line 30

piler@mypiler01:~$ echo $?
0

Should I be using a different PHP version or are those warnings to be 
expected?


FreeTSA should be available for your testing purposes.


Thanks,

Patrick

On 16.10.2020 21:19, s...@acts.hu wrote:



Hello Patrick,

for starters the DECRYPT_ATTACHMENT_BINARY should be pileraget (not 
pilerget).


Also it might be worth to go over the steps and check if everything is 
setup properly:


https://bitbucket.org/jsuto/piler/issues/480/support-rfc3161-trusted-timestamps 


https://www.mail-archive.com/piler-user@list.acts.hu/msg00785.html

In the meantime I try to find a TSA provider suitable for testing 
purposes.
If anyone on the list was familiar with any, or better could provide a 
test

account, it would be great.

Janos



On 2020-10-16 20:02, Patrick Wagner wrote:

Hello everyone,

we're testing the TSA signing feature of Piler. When I login as
auditor all mails are listed correctly in the Web GUI upper pane /
list. When I click on a mail the header and content are displayed
below if that mail was not signed (yet). Clicking on a signed mail
however does not refresh the lower pane and continues to display
either the last non-stamped mail or remains blank (if no mail had been
selected before). With pilerget on the CLI the mails are displayed
correctly.

What's wrong? Do I have to change any configuration?

I added these lines in config-site.php:
$config['TSA_PUBLIC_KEY_FILE'] = '/etc/piler/tsa.publickey.pem';
$config['TSA_START_ID'] = 1;
$config['TSA_STAMP_REQUEST_UNIT_SIZE'] = 500;
$config['TSA_URL'] = 'http://zeitstempel.dfn.de';

$config['DECRYPT_BINARY'] = '/usr/bin/pilerget';
$config['DECRYPT_ATTACHMENT_BINARY'] = '/usr/bin/pilerget';


Thanks,
Patrick

# piler -V
piler 1.3.5, build 997, Janos SUTO 

Build Date: Sun Apr 21 16:50:30 UTC 2019
ldd version: ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
gcc version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
OS: Linux 188ae4f9894f 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13
10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Configure command: ./configure --prefix=/usr --sysconfdir=/etc
--localstatedir=/var --with-database=mariadb
MySQL client library version: 10.2.9
Extractors: /usr/bin/pdftotext /usr/bin/catdoc /usr/bin/catppt
/usr/bin/xls2csv /usr/bin/unrtf /usr/bin/tnef

Ubuntu 18.04.5 LTS

PHP 7.2.24-0ubuntu0.18.04.6 (as supplied with the distro)

MariaDB 10.1.44 (as supplied with the distro)






Re: Piler 1.35 on Ubuntu 18.04 - Web UI doesn't show mail headers / contents

2020-08-01 Thread Wagner, Patrick




Hello Martin,

indeed, you are correct - the address that doesn't work is exactly 42 
characters long. So looks like it's the same issue and you're not the 
only one affected.


Interesting that this issue never surfaced before?

- Patrick

On 31.07.2020 18:18, Martin Nadvornik wrote:


Hello Patrick,

of course check what Janos said first, but if it's just one single
e-mail account where mails are not shown in the webgui, it would be
interesting if the account has access in piler to an address that is
longer than 41 characters. I stumbled upon this for our piler instance
recently
(https://bitbucket.org/jsuto/piler/issues/1082/no-sphinx-results-with-long-email).
Let me know if you have the same issue.

Thanks,
Martin

Am 31.07.2020 um 17:34 schrieb s...@acts.hu:


On 2020-07-31 17:16, Wagner, Patrick wrote:

So that issue is fixed now, but has unearthed another - I can find and
open all mails just fine as auditor@local, and logging in with my
personal account works as well (I'm shown only my emails, as it should
be), but another email address / account I've tested doesn't show any
emails even though the usage report and my login as auditor definitely
contains emails for this email address? I've even used copy and paste
out of the usage report UI to change email address and username for
the piler account in question (basically a NOOP, as there was no typo
before either)

check the sphinx query logged when this other user hits the search
button.
Verify that his email addresses are present in the query. If that's good,
then download or export a single email he should see, and run pilertest
on the email to see what piler thinks about it. Check that the From/To/Cc
fields have his email address.

Janos





Re: Piler 1.35 on Ubuntu 18.04 - Web UI doesn't show mail headers / contents

2020-07-31 Thread Wagner, Patrick

Hello Janos,


thanks for your prompt response, correct as always! The paths were still 
referring to /usr/local instead of /usr.


So that issue is fixed now, but has unearthed another - I can find and 
open all mails just fine as auditor@local, and logging in with my 
personal account works as well (I'm shown only my emails, as it should 
be), but another email address / account I've tested doesn't show any 
emails even though the usage report and my login as auditor definitely 
contains emails for this email address? I've even used copy and paste 
out of the usage report UI to change email address and username for the 
piler account in question (basically a NOOP, as there was no typo before 
either)


In the past I would only see "no search results" if the sphinx cronjobs 
didn't run properly, and in that case the auditor or other users 
wouldn't see any mails either, so this time it's another issue?


Thanks,

Patrick

On 31.07.2020 15:09, Janos SUTO wrote:

Hello Patrick,

fix the piler binary paths in config-site.php. Check out the current 
values in config.php.


Janos SUTO
On 31 Jul 2020, at 14:07, "Wagner, Patrick" <mailto:patrick.wag...@rga-net.de>> wrote:



Hello everyone,


just opened an older piler archive (version 1.35) and was surprised to
see all the emails listed in the web GUI upper pane / list, including
icons for attachments and correct messages sizes, but I cannot display
the actual email headers or contents.

The lower pane / detail pane per email is pretty much empty:


Subject:
From:
To:
Date:



Attachment names are shown, however every attachment I try to open is 1
bytes on download, so obviously unusable.

Thankfully it seems to be a web GUI interface only, as a test with
pilerexport yielded the email contents, including attachments.

What's wrong? Is the Piler version too old for modern browsers? What do
I need to fix?

Thanks,

Patrick


# piler -V
piler 1.3.5, build 997, Janos SUTO 

Build Date: Sun Apr 21 16:50:30 UTC 2019
ldd version: ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
gcc version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
OS: Linux 188ae4f9894f 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13
10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Configure command: ./configure --prefix=/usr --sysconfdir=/etc
--localstatedir=/var --with-database=mariadb
MySQL client library version: 10.2.9
Extractors: /usr/bin/pdftotext /usr/bin/catdoc /usr/bin/catppt
/usr/bin/xls2csv /usr/bin/unrtf /usr/bin/tnef

Ubuntu 18.04.4 LTS

PHP 7.2.24-0ubuntu0.18.04.6 (as supplied with the distro)

MariaDB 10.1.44 (as supplied with the distro)


*
*




Piler 1.35 on Ubuntu 18.04 - Web UI doesn't show mail headers / contents

2020-07-31 Thread Wagner, Patrick




Hello everyone,


just opened an older piler archive (version 1.35) and was surprised to 
see all the emails listed in the web GUI upper pane / list, including 
icons for attachments and correct messages sizes, but I cannot display 
the actual email headers or contents.


The lower pane / detail pane per email is pretty much empty:


Subject:
From:
To:
Date:



Attachment names are shown, however every attachment I try to open is 1 
bytes on download, so obviously unusable.


Thankfully it seems to be a web GUI interface only, as a test with 
pilerexport yielded the email contents, including attachments.


What's wrong? Is the Piler version too old for modern browsers? What do 
I need to fix?


Thanks,

Patrick


# piler -V
piler 1.3.5, build 997, Janos SUTO 

Build Date: Sun Apr 21 16:50:30 UTC 2019
ldd version: ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
gcc version: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
OS: Linux 188ae4f9894f 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 
10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Configure command: ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --with-database=mariadb

MySQL client library version: 10.2.9
Extractors: /usr/bin/pdftotext /usr/bin/catdoc /usr/bin/catppt 
/usr/bin/xls2csv /usr/bin/unrtf /usr/bin/tnef


Ubuntu 18.04.4 LTS

PHP 7.2.24-0ubuntu0.18.04.6 (as supplied with the distro)

MariaDB 10.1.44 (as supplied with the distro)


*
*




Re: yet another gdpr related email

2018-05-27 Thread Wagner, Patrick



Hello Janos,

at the end of the gdpr-related-notes document you mention three specific 
features: delete feature / purging feature / legal hold feature. I'm 
aware of the documentation for pilerpurge on your website, but what 
about the other two features?


Thanks,

Patrick


On 27.05.2018 20:10, s...@acts.hu wrote:



Dear piler users,

now that GDPR is on us, we all got tons of updated privacy policy emails
from several places. I've also created the privacy policy for the piler
sites, please check http://www.mailpiler.org/wiki/privacy-policy

This link refers to https://mailpiler.com/privacy-policy/ which applies
to both mailpiler.com and (www.)mailpiler.org. The .org site has some
additional notes regarding the mailing list and bitbucket.

You may check http://www.mailpiler.org/wiki/current:gdpr-related-notes
as well. This latter link provides a few notes you should know if you
have an email archive. I assume it takes all of us.

It describes what data the piler archive stores, what security measures
it supports, etc.

Let me know if you have any questions regarding either of these topics.

Janos