~tomleb

~tomleb/public-inbox

Last active 6 months ago

~tomleb/mpdnotify

Last active 1 year, 5 months ago
View more

Recent activity

Re: [PATCH gmnisrv] Update pollfd pointers when destroying a client 23 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

On 2020-11-08 8:06 p.m., Kenny Levinsen wrote:
> On Sun, Nov 8, 2020 at 18:43, Tom Lebreux <me@tomlebreux.com> wrote:
>> Damn I've been trying to fix the issue of not handling concurrent 
>> clients and I couldn't find it. This looks like that was the problem. 
>> Any tips on how could've helped me figure it out? How did you find 
>> this issue?
> 
> So key points in what I did:
> 
> 1. Write well-formatted logging - you're going to be seeing a lot of it, 
> and it
> needs to be readable so you can analyze it. E.g., my log output looked
> something along the lines of (note: not actual output, threw that away):
> 

Re: [PATCH gmnisrv] Update pollfd pointers when destroying a client 23 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

On 2020-11-08 5:59 p.m., Kenny Levinsen wrote:
> The client pollfd pointer would go stale when the server pollfd array
> was moved to compensate for a destroyed client, which in turn led to
> poll breakage.

Damn I've been trying to fix the issue of not handling concurrent 
clients and I couldn't find it. This looks like that was the problem. 
Any tips on how could've helped me figure it out? How did you find this 
issue?

Re: gmnisrv diagnostics 24 days ago

From Tom Lebreux to ~sircmpwn/public-inbox

On 2020-11-07 10:29 a.m., Drew DeVault wrote:
> I had thought that I fixed this with recent changes to how data is
> delivered between OpenSSL and read(2)/write(2). Are you observing these
> issues on an up-to-date version of gmnisrv?
> 

Not the person you replied to but I see this behavior with current 
master (d484ba0ab002).

Here is my little test script.

     gm() {
       ./gmni gemini://localhost/$1
       echo Done $1

[PATCH v2] Don't memmove one past clients 24 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

---
v1 -> v2: Change the commit message because it was just plain false.

I could have also changed it like so, but I prefered to keep consistent
with the one below. I also found it easier to read.

    memmove(client, &client[1], &server->clients[server->clientsz - 1] - client);

 src/server.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/server.c b/src/server.c
index 9ce304fcc949..4a38eaa0e0af 100644
--- a/src/server.c
[message trimmed]

[PATCH] Fix not moving all clients 25 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

---
I could have also changed it like so, but I prefered to keep consistent
with the one below. I also found it easier to read.

    memmove(client, &client[1], &server->clients[server->clientsz - 1] - client);


 src/server.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/server.c b/src/server.c
index 9ce304fcc949..4a38eaa0e0af 100644
--- a/src/server.c
+++ b/src/server.c
[message trimmed]

[PATCH] Fix not moving all fds 25 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

---
 src/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server.c b/src/server.c
index 3a07b9bb798f..9ce304fcc949 100644
--- a/src/server.c
+++ b/src/server.c
@@ -200,7 +200,7 @@ disconnect_client(struct gmnisrv_server *server, struct gmnisrv_client *client)
	memmove(client, &client[1], &server->clients[server->clientsz] - client);
	memmove(&server->fds[server->nlisten + index],
		&server->fds[server->nlisten + index + 1],
		server->fdsz - (server->nlisten + index + 1) * sizeof(struct pollfd));
		(server->fdsz - (server->nlisten + index + 1)) * sizeof(struct pollfd));
[message trimmed]

[PATCH] Fix memory leaks 25 days ago

From Tom Lebreux to ~sircmpwn/gmni-devel

---
 src/mime.c  | 2 ++
 src/serve.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/mime.c b/src/mime.c
index 9f3f6d057851..599128105956 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -71,6 +71,8 @@ mime_init()

		free(mime);
	}
	free(line);
[message trimmed]

Re: gmnisrv diagnostics 25 days ago

From Tom Lebreux to ~sircmpwn/public-inbox

On 2020-11-06 2:45 a.m., Garrit Franke wrote:
> I found this[1] diagnostics-script in the gemini mailing list and ran
> it against your gmnisrv server.
> There are some edge-cases that did not succeed (See results[2]). Hope it helps!

Interesting. One of the edge cases is that the server is unable to 
handle concurrent connections. I've been trying to find the issue with 
this but I don't have a lot of experience with poll() based applications.

Pretty simple to reproduce:

     ./gmni gemini://localhost/test.gmi &
     ./gmni gemini://localhost/test.gmi

Re: Wrapping text in Thunderbird 78 27 days ago

From Tom Lebreux to ~sircmpwn/public-inbox

On 2020-11-04 1:02 p.m., arnauld@arnauld.org wrote:
> Hello,
> 
> I just read your web page about plain text e-mail and I can't find any 
> options for wrappin text in Thunderbird 78.

Hey Arnaud,




you can find the information by going to Edit > Preferences > General, 
then scroll down at the very bottom and click on "Config Editor...". A 
prompt will appear, click on the "I accept the risk button".

Re: Alternative mail provider a month ago

From Tom Lebreux to ~sircmpwn/public-inbox

On 10/22/20 6:34 PM, Drew DeVault wrote:
> Fails some pretty basic initial tests by being chock-full of third-party
> trackers.
> 

Heh, right.

A bit offtopic but for some reason, a small part of my message is missing 
from the mailing list.

I can properly see the whole message I sent on this mailing list [0].
However, that message from me, to the mailing list (which I receive a copy of)
is missing the second link as well as the last sentence. I've tried with two devices
(two email apps) and I see the same behavior on both. Could it be a problem with the