Date: Wed, 15 Apr 2020 08:55:12 +1000 From: Andrew Reilly <areilly@bigpond.net.au> To: freebsd-stable@freebsd.org Subject: Re: Curl giving (27) Out of memory error where it didn't before Message-ID: <446EDF4B-E736-4297-A132-C67EEC682785@bigpond.net.au> In-Reply-To: <93AF62DD-3638-4326-BDAC-0054793FAB07@bigpond.net.au> References: <93AF62DD-3638-4326-BDAC-0054793FAB07@bigpond.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Bother. Password leaked. Password changed. Thanks for the warning! Cheers, Andrew Reilly M: 0409-824-272 areilly@bigpond.net.au > On 15 Apr 2020, at 07:35 , Andrew Reilly <areilly@bigpond.net.au> = wrote: >=20 > Hi there, >=20 > I have a cron job that is supposed to email me at a backup email = account if my ISP ever changes my IP address. It doesn't happen very = often, but it happened again this morning, and I was disappointed to = find that the script that does the notification failed. >=20 > Sending e-mail in this way requires SSL connection to my ISP's mail = server (smtp.bigpond.com) and authentication, and I was pleased to = discover, a while back, that curl can handle both of those details, as = well as sending email. So I use this script (edited to elide passwords = and addresses): > email-myself.sh: > #!/bin/sh > /usr/local/bin/curl -v -T- --ssl-reqd smtps://smtp.bigpond.com = --mail-from areilly@bigpond.net.au --mail-rcpt backup_address@me.com = --mail-auth areilly@bigpond.net.au --user = areilly@bigpond.net.au:password <<END > From: Andrew Reilly <areilly@bigpond.net.au> > To: Andrew Reilly <backup_address@me.com> > Subject: $1 > Date: $(date -R) >=20 > $2 > END >=20 > As I said, previously that has worked perfectly, but today I'm getting = the following in my logs (thanks to having verbose output turned on): >=20 > % Total % Received % Xferd Average Speed Time Time Time = Current > Dload Upload Total Spent Left = Speed > 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 = --:--:-- 0* Trying 203.36.137.240:465... > * Connected to smtp.bigpond.com (203.36.137.240) port 465 (#0) > * successfully set certificate verify locations: > * CAfile: /usr/local/share/certs/ca-root-nss.crt > CApath: none > } [5 bytes data] > * TLSv1.3 (OUT), TLS handshake, Client hello (1): > } [512 bytes data] > * TLSv1.3 (IN), TLS handshake, Server hello (2): > { [91 bytes data] > * TLSv1.2 (IN), TLS handshake, Certificate (11): > { [4836 bytes data] > * TLSv1.2 (IN), TLS handshake, Server key exchange (12): > { [333 bytes data] > * TLSv1.2 (IN), TLS handshake, Server finished (14): > { [4 bytes data] > * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): > } [70 bytes data] > * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): > } [1 bytes data] > * TLSv1.2 (OUT), TLS handshake, Finished (20): > } [16 bytes data] > * TLSv1.2 (IN), TLS handshake, Finished (20): > { [16 bytes data] > * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 > * Server certificate: > * subject: C=3DAU; ST=3DVictoria; L=3DMelbourne; O=3DTelstra = Corporation Limited; OU=3DTechnology Product Ownership CH10; = CN=3Dmail.bigpond.com > * start date: Jan 23 03:57:06 2020 GMT > * expire date: Jan 23 04:07:00 2022 GMT > * subjectAltName: host "smtp.bigpond.com" matched cert's = "smtp.bigpond.com" > * issuer: C=3DBM; O=3DQuoVadis Limited; CN=3DQuoVadis Global SSL ICA = G2 > * SSL certificate verify ok. > { [5 bytes data] > < 220 smtp.telstra.com ESMTP Service ready > } [5 bytes data] >> EHLO Zen > { [5 bytes data] > < 250-smtp.telstra.com > < 250-8BITMIME > < 250-PIPELINING > < 250-HELP > < 250-AUTH=3DLOGIN > < 250-AUTH LOGIN PLAIN > < 250-DELIVERBY 300 > < 250 SIZE 30000000 > } [5 bytes data] >> AUTH PLAIN > { [5 bytes data] > < 334 ? > } [5 bytes data] >> AGFyZWlsbHlAYmlncG9uZC5uZXQuYXUARnJhaGFuMHc=3D > { [5 bytes data] > < 235 PLAIN authentication successful > 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 = --:--:-- 0 > } [5 bytes data] >> QUIT > { [5 bytes data] > < 221 smtp.telstra.com QUIT > * Closing connection 0 > } [5 bytes data] > * TLSv1.2 (OUT), TLS alert, close notify (256): > } [2 bytes data] > curl: (27) Out of memory >=20 > That looks to me as though the SSL setup worked fine, then the AUTH = fine, then the message transfer all fine, and quitting too. So = everything was fine, but then curl crashed with error 27 "out of = memory", and I haven't received any messages. >=20 > The web thinks that the two most likely ways for an out-of-date shared = library linkage or a not-thread-safe programming bug. So I used = portmaster -f to rebuild curl and all its dependencies, and it still = crashes exactly as shown. >=20 > The computer in question is running: (uname -a) > FreeBSD Zen.local 12.1-STABLE FreeBSD 12.1-STABLE r359760 GENERIC = amd64 >=20 > and has 32G of RAM and eight two-thread AMD 1700 cores. >=20 > Any suggestions? >=20 > Andrew Reilly > M: 0409-824-272 > areilly@bigpond.net.au >=20 >=20 >=20 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?446EDF4B-E736-4297-A132-C67EEC682785>