[erlang-questions] ftp lib behaviour has changed between ftp-1.0.1 and ftp-1.0.2

Ingela Andin ingela.andin@REDACTED
Tue Jul 9 20:49:38 CEST 2019


Hi Robert!

Well it somewhat unexpected that it returns an undocumented value. It might
be that the correction made to fix a timing bug in the FTP application, that
was exposed by TLS optimizations when running FTP over TLS, uncovered some
other timing bug. Most of the FTP code is very old and I wished for the
gen_statem behavior while fixing the bug I just mentioned, so I would not
be very surprised if there are more race conditions in that code.

Regards Ingela Erlang/OTP team

Den mån 8 juli 2019 kl 18:11 skrev Robert Raschke <rtrlists@REDACTED>:

> Hi,
>
> I have code that matches on {ok, Result} and {error, Reason} tuples coming
> from calls to ftp:ls/2 and ftp:recv_bin/2 (on 21.1, ftp-1.0.1) and
> upgrading to 21.3 (ftp-1.0.2) sometimes returns a simple ok on those calls.
> This is surprising.
>
> 15> f().
>
> ok
>
> 16> {ok, FTP} = ftp:open("somesite"), ok = ftp:user(FTP, "someuser",
> "somepwd"), timer:sleep(100), R = ftp:ls(FTP, "/somefolder/*"),
> ftp:close(FTP), R.
>
> {ok,"-rw-r--r--    1 2001       2001           174993 Jul  8 17:16 ..."}
>
> 17> f().
>
> ok
>
> 18> {ok, FTP} = ftp:open("somesite"), ok = ftp:user(FTP, "someuser",
> "somepwd"), timer:sleep(100), R = ftp:ls(FTP, "/somefolder/*"),
> ftp:close(FTP), R.
>
> ok
>
> 19>
>
>
> What might be the reason for this? And is this expected?
>
>
> Cheers,
>
> Robby
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190709/8f08e185/attachment.htm>


More information about the erlang-questions mailing list