Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCC transfer failed when resizing a terminal emulator window #677

Closed
hasB4K opened this Issue Feb 3, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@hasB4K
Copy link

hasB4K commented Feb 3, 2016

Hello,

I have detected a weird issue, it seems that when you resize a terminal emulator window like xterm or urxvt with weechat in it, all DCC transfer that was active, will now be in 'failed' status.

I have reproduced this issues on:

  • Linux (Archlinux)
  • i3-wm as Windows Manager
  • xterm and rxvt-unicode as terminal emulators

Weechat versions concerned:

  • WeeChat 1.4 [compiled on Feb 2 2016 09:40:40]
  • WeeChat 1.5-dev (git: v1.4-32-g02bcee0) [compiled on Feb 3 2016 17:13:51]

Steps to reproduce:

  • Launch a DCC transfer to your weechat client
  • Change the dimension of your terminal emulator (with or without being in the 'xfer.list' buffer, it seems that it's not related!)

Thank you for your time,
hasB4K

@flashcode flashcode changed the title DCC transfer will failed when resizing a terminal emulator window DCC transfer failed when resizing a terminal emulator window Feb 4, 2016

@flashcode flashcode added the bug label Feb 4, 2016

@flashcode

This comment has been minimized.

Copy link
Member

flashcode commented Feb 4, 2016

I will make some tests, but I'm surprised that a resize of the terminal can have any impact on a DCC!
Just to be sure, you're using DCC file, not chat?

@hasB4K

This comment has been minimized.

Copy link
Author

hasB4K commented Feb 4, 2016

Yes I know it's a weird bug, and it took me a while to figure it out...

And yes I'm using DCC file, but it seems that this bug only occur when you receive a file, not when you send one.

  • DCC Chat: no issue
  • DCC File (send): no apparent issue
  • DCC File (receive): Fail when resizing
@sim642

This comment has been minimized.

Copy link
Contributor

sim642 commented Feb 5, 2016

Confirmed receiving bug on 438f2de.

It seems to be somewhat related to this.

@sim642

This comment has been minimized.

Copy link
Contributor

sim642 commented Feb 5, 2016

I've narrowed down the exact call which doesn't properly handle the suspected EINTR and put in additional checks. My fixes are in PR #680.

@flashcode

This comment has been minimized.

Copy link
Member

flashcode commented Feb 7, 2016

Just for info, I found an old commit fixing similar bug with DCC: edd70d4

@flashcode flashcode added this to the 1.5 milestone Feb 7, 2016

@flashcode flashcode self-assigned this Feb 7, 2016

@flashcode flashcode closed this in b12412e Feb 7, 2016

arza-zara pushed a commit to arza-zara/weechat that referenced this issue Oct 4, 2016

xfer: ignore signals when polling socket during file receive (closes w…
…eechat#677)

When signals (e.g. SIGWINCH for terminal resize) are fired they cause poll
to fail with EINTR, erroring file receival even when there wasn't a problem
with it.

This patch adds additional checks for EINTR and EAGAIN that cause retry of
poll, since both are unrelated to actual file receival.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.