Attachments with unicode filenames cause timeout errors when retreiving attachments




7 months ago
7 months ago


(Reporter: dylan, Assigned: dylan)


Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(3 attachments)


Comment 1

7 months ago
Mojo super powers time.

I connected to one of the web-workers, and do this:

perl get ''

the output below:

(logging omitted)
Inactivity timeout at local/lib/perl5/Mojolicious/Command/ line 77.

isn't very helpful yet, but I can now use the debugger or other tools to figure out why this is taking so long.
I have spot-checked files attached in 24 hours and these are fine. Also checked several past PDF files and these are also fine.
And this PDF also looks good.

Comment 5

7 months ago
The underlying error is this:

Mojo::Reactor::EV: I/O watcher failed: Wide character in subroutine entry at /app/local/lib/perl5/Mojo/IOLoop/ line 83.

which suggests the attachment data is encoded as characters and not bytes; however it seems like attachment->data is returning bytes.

Comment 6

7 months ago
Mojo::Reactor::EV: I/O watcher failed: whee at /app/local/lib/perl5/Mojo/IOLoop/ line 86.
	Mojo::IOLoop::Stream::write(Mojo::IOLoop::Stream=HASH(0x9efc668), "HTTP/1.1 200 OK\x{d}\x{a}Link: </static/v20181002.3/skins/standard/fo"..., CODE(0xa0a0828)) called at /app/local/lib/perl5/Mojo/Server/ line 247
	Mojo::Server::Daemon::_write(Mojo::Server::Daemon=HASH(0x9ec1be8), "6ad5338f90159e7441fba0ad2da0abce") called at /app/local/lib/perl5/Mojo/Server/ line 114
	Mojo::Server::Daemon::__ANON__(Mojo::Transaction::HTTP=HASH(0xa090148)) called at /app/local/lib/perl5/Mojo/ line 15
	Mojo::EventEmitter::emit(Mojo::Transaction::HTTP=HASH(0xa090148), "request") called at /app/local/lib/perl5/Mojo/Transaction/ line 60
	Mojo::Transaction::HTTP::server_read(Mojo::Transaction::HTTP=HASH(0xa090148), "GET /attachment.cgi?id=9013900 HTTP/1.1\x{d}\x{a}User-Agent: Mojolici"...) called at /app/local/lib/perl5/Mojo/Server/ line 221
	Mojo::Server::Daemon::_read(Mojo::Server::Daemon=HASH(0x9ec1be8), "6ad5338f90159e7441fba0ad2da0abce", "GET /attachment.cgi?id=9013900 HTTP/1.1\x{d}\x{a}User-Agent: Mojolici"...) called at /app/local/lib/perl5/Mojo/Server/ line 202
	Mojo::Server::Daemon::__ANON__(Mojo::IOLoop::Stream=HASH(0x9efc668)) called at /app/local/lib/perl5/Mojo/ line 15
	Mojo::EventEmitter::emit(Mojo::IOLoop::Stream=HASH(0x9efc668), "read", "GET /attachment.cgi?id=9013900 HTTP/1.1\x{d}\x{a}User-Agent: Mojolici"...) called at /app/local/lib/perl5/Mojo/IOLoop/ line 102
	Mojo::IOLoop::Stream::_read(Mojo::IOLoop::Stream=HASH(0x9efc668)) called at /app/local/lib/perl5/Mojo/IOLoop/ line 48
	Mojo::IOLoop::Stream::__ANON__(Mojo::Reactor::EV=HASH(0x24b2298)) called at /app/local/lib/perl5/Mojo/Reactor/ line 143
	eval {...} called at /app/local/lib/perl5/Mojo/Reactor/ line 143
	Mojo::Reactor::Poll::_try(Mojo::Reactor::EV=HASH(0x24b2298), "I/O watcher", CODE(0xa09f340), 0) called at /app/local/lib/perl5/Mojo/Reactor/ line 46
	Mojo::Reactor::EV::__ANON__(EV::IO=SCALAR(0xa08ff08), 1) called at /app/local/lib/perl5/Mojo/Reactor/ line 25
	eval {...} called at /app/local/lib/perl5/Mojo/Reactor/ line 25
	Mojo::Reactor::EV::start(Mojo::Reactor::EV=HASH(0x24b2298)) called at /app/local/lib/perl5/Mojo/ line 136
	Mojo::IOLoop::start(Mojo::IOLoop=HASH(0x24b1f50)) called at /app/local/lib/perl5/Mojo/ line 65
	Mojo::UserAgent::start(Mojo::UserAgent=HASH(0x9eba478), Mojo::Transaction::HTTP=HASH(0x9edb580)) called at local/lib/perl5/Mojolicious/Command/ line 76
	Mojolicious::Command::get::run(Mojolicious::Command::get=HASH(0x9eba028), "-H", "Host:", "-i", 0, "/attachment.cgi?id=9013900", "-v") called at /app/local/lib/perl5/Mojolicious/ line 54
	Mojolicious::Commands::run(Mojolicious::Commands=HASH(0x9eb9f50), "get", "-H", "Host:", "-i", 0, "/attachment.cgi?id=9013900", "-v") called at /app/local/lib/perl5/ line 203
	Mojolicious::start(Bugzilla::Quantum=HASH(0x7072c78)) called at /app/local/lib/perl5/Mojolicious/ line 71
	Mojolicious::Commands::start_app("Mojolicious::Commands", "Bugzilla::Quantum") called at line 20
Summary: Some attachments are not working → Attachments with unicode filenames cause timeout errors when retreiving attachments

Comment 8

7 months ago
Not sure if it's of any help (likely not)... but the attachments for [bug 1495965] were created using the 'Print to PDF' feature of an El Capitan Mac (i.e. without any modification of default operating system settings and/or third-party software)...

Comment 9

7 months ago
(In reply to Dylan Hardison [:dylan] (he/him) from comment #0)
> For instance:
> will timeout.

O.K. to ask what change was made to the linked attachment (per the other bug report)?  In contrast to the other three attachments on [bug 1495965] the file does, now, load - but attempting to edit the filename (changing the second dash) did not result in the same behavior; worth noting is that the second dash appears to be the only change made... though that particular character was used by Safari in the name chosen for the file (likely pulled from the title of the page), i.e. the only change made when using 'Print to PDF' was prepending the name with an ordinal & an ordinary dash...
The fix already merged and deployed today.
Last Resolved: 7 months ago
Resolution: --- → FIXED

Comment 12

7 months ago
Manually changing the filenames didn't help (please note the previous question for Dylan) - but the fix did (appears to be working without issue on the original/default file names)...
You need to log in before you can comment on or make changes to this bug.