maildev@lists.thunderbird.net

Thunderbird email developers

View all threads

Forking M-C has begun

JK
Jörg Knobloch
Wed, Sep 27, 2017 1:43 AM

Hi all,

today I had to fork nsIStreamTransportService since M-C rendered it useless.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403393

Jörg.

Hi all, today I had to fork nsIStreamTransportService since M-C rendered it useless. https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 Jörg.
JC
Joshua Cranmer 🐧
Wed, Sep 27, 2017 3:57 AM

On 9/26/2017 9:43 PM, Jörg Knobloch wrote:

Hi all,

today I had to fork nsIStreamTransportService since M-C rendered it
useless.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403393

Big decisions should not be taken hastily. We don't have the resources
to maintain core bits of Gecko or Necko.

Looking really quickly at the bug, I believe the intended fix would be
to replace

rv = sts->CreateInputTransport(stream, int64_t(aStartPosition),
int64_t(aReadCount), true, getter_AddRefs(m_transport));

with

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream,
aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true,
getter_AddRefs(m_transport));

No need for a fork or any m-c changes at all in that case.

--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist

On 9/26/2017 9:43 PM, Jörg Knobloch wrote: > Hi all, > > today I had to fork nsIStreamTransportService since M-C rendered it > useless. > > https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 Big decisions should not be taken hastily. We don't have the resources to maintain core bits of Gecko or Necko. Looking really quickly at the bug, I believe the intended fix would be to replace rv = sts->CreateInputTransport(stream, int64_t(aStartPosition), int64_t(aReadCount), true, getter_AddRefs(m_transport)); with RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, aStartPosition, aReadCount); rv = sts->CreateInputTransport(sliceStream, true, getter_AddRefs(m_transport)); No need for a fork or any m-c changes at all in that case. -- Joshua Cranmer Thunderbird and DXR developer Source code archæologist
BB
Ben Bucksch
Wed, Sep 27, 2017 5:36 AM

Joshua Cranmer 🐧 wrote on 27.09.17 05:57:

On 9/26/2017 9:43 PM, Jörg Knobloch wrote:

Hi all,

today I had to fork nsIStreamTransportService since M-C rendered it
useless.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403393

Big decisions should not be taken hastily. We don't have the resources
to maintain core bits of Gecko or Necko.

+1

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream,
aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true,
getter_AddRefs(m_transport));

Thanks for the tip, Joshua

Joshua Cranmer 🐧 wrote on 27.09.17 05:57: > On 9/26/2017 9:43 PM, Jörg Knobloch wrote: >> Hi all, >> >> today I had to fork nsIStreamTransportService since M-C rendered it >> useless. >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 > > Big decisions should not be taken hastily. We don't have the resources > to maintain core bits of Gecko or Necko. +1 > RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, > aStartPosition, aReadCount); > rv = sts->CreateInputTransport(sliceStream, true, > getter_AddRefs(m_transport)); Thanks for the tip, Joshua
JK
Jörg Knobloch
Wed, Sep 27, 2017 5:45 AM

On 27/09/2017 05:57, Joshua Cranmer 🐧 wrote:

Looking really quickly at the bug, I believe the intended fix would be to replace

rv = sts->CreateInputTransport(stream, int64_t(aStartPosition), int64_t(aReadCount), true, getter_AddRefs(m_transport));

with

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true, getter_AddRefs(m_transport));

SlicedInputStream() is missing parameter: https://bugzilla.mozilla.org/show_bug.cgi?id=1402888#c14

We can back out the forked code once that has been added. Volunteers, step forward.

Jörg.

EW
Enrico Weigelt, metux IT consult
Wed, Sep 27, 2017 7:02 AM

On 27.09.2017 05:57, Joshua Cranmer 🐧 wrote:

On 9/26/2017 9:43 PM, Jörg Knobloch wrote:

Hi all,

today I had to fork nsIStreamTransportService since M-C rendered it
useless.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403393

Big decisions should not be taken hastily. We don't have the resources
to maintain core bits of Gecko or Necko.

Perhaps have a talk w/ the people of all the other moz forks ?

--mtx

--

mit freundlichen Grüßen

Enrico, Sohn von Wilfried, a.d.F. Weigelt,
metux IT consulting
+49-151-27565287

On 27.09.2017 05:57, Joshua Cranmer 🐧 wrote: > On 9/26/2017 9:43 PM, Jörg Knobloch wrote: >> Hi all, >> >> today I had to fork nsIStreamTransportService since M-C rendered it >> useless. >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 > > Big decisions should not be taken hastily. We don't have the resources > to maintain core bits of Gecko or Necko. Perhaps have a talk w/ the people of all the other moz forks ? --mtx -- mit freundlichen Grüßen -- Enrico, Sohn von Wilfried, a.d.F. Weigelt, metux IT consulting +49-151-27565287
JK
Jörg Knobloch
Wed, Sep 27, 2017 12:57 PM

On 27/09/2017 07:45, Jörg Knobloch wrote:

On 27/09/2017 05:57, Joshua Cranmer 🐧 wrote:

Looking really quickly at the bug, I believe the intended fix would be to replace

rv = sts->CreateInputTransport(stream, int64_t(aStartPosition), int64_t(aReadCount), true, getter_AddRefs(m_transport));

with

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true, getter_AddRefs(m_transport));

SlicedInputStream() is missing parameter: https://bugzilla.mozilla.org/show_bug.cgi?id=1402888#c14

We can back out the forked code once that has been added. Volunteers, step forward.

Sorry, I missed the second line. I've backed out the forked code and landed a solution as per Joshua's suggestion.

Sadly, we're busted again by something else, the next bustage came with the next M-C merge.

Jörg.

JK
Jörg Knobloch
Thu, Sep 28, 2017 10:22 PM

On 27/09/2017 05:57, Joshua Cranmer 🐧 wrote:

Looking really quickly at the bug, I believe the intended fix would be to replace

rv = sts->CreateInputTransport(stream, int64_t(aStartPosition), int64_t(aReadCount), true, getter_AddRefs(m_transport));

with

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true, getter_AddRefs(m_transport));

After recovering from unrelated bustage I had to revisit this.

As we know, https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 made changes to nsIStreamTransportService.

My first approach was to fork the code and create nsIStreamTransportService2 in C-C. That caused two test failures. Maybe I made a mistake forking or perhaps there was some interaction with the rest of Necko that the fork didn't handle.

By popular demand I backed out the forked code again and used SlicedInputStream() as had been suggested. Result:

Four test failures, the original two and two more: Details in https://bugzilla.mozilla.org/show_bug.cgi?id=1403771.

Comments welcome. Any volunteers willing to help debug this are also welcome. Ben? All hands on deck?

This seems to have caused bug https://bugzilla.mozilla.org/show_bug.cgi?id=1404003 (Daily from 2017-09-28 re-downloads and indexes messages at every start) which makes TB Daily pretty useless for IMAP use.

Jörg.

JK
Jörg Knobloch
Sun, Oct 1, 2017 9:48 PM

On 27/09/2017 05:57, Joshua Cranmer 🐧 wrote:

Looking really quickly at the bug, I believe the intended fix would be to replace

rv = sts->CreateInputTransport(stream, int64_t(aStartPosition), int64_t(aReadCount), true, getter_AddRefs(m_transport));

with

RefPtr<SlicedInputStream> sliceStream = new SlicedInputStream(stream, aStartPosition, aReadCount);
rv = sts->CreateInputTransport(sliceStream, true, getter_AddRefs(m_transport));

As we know, https://bugzilla.mozilla.org/show_bug.cgi?id=1403393 made changes to nsIStreamTransportService.

My first approach was to fork the code and create nsIStreamTransportService2 in C-C.

By popular demand I backed out the forked code again and used SlicedInputStream() as had been suggested.

After all the other crises have been mostly cleared, I had to come back to the remaining test failures originating from replacing the original code in its forked form with calls to SlicedInputStream() - https://bugzilla.mozilla.org/show_bug.cgi?id=1403771#c13.

It turns out that compaction on Windows stopped working. Basically the Windows system call to move the compacted raw message file to replace the original message file fails with "access denied" since due to the new processing the file is still locked.

I can see that this could take many hours do debug, including Necko code. I also see some disconcerting messages come from Necko, like: WARNING: 'NS_FAILED(rv)', file c:/mozilla-source/comm-central/mozilla/xpcom/io/SlicedInputStream.cpp, line 119

So decision we need to take here is:

  • Use the working forked code with the maintenance burden or
  • use the so-called non-working "proper" solution and run the risk that we lose compaction for the foreseeable future.

I vote for the fork. However wants to investigate the compaction failure can simply remove the fork and apply the SlicedInputStream() patches again.

With current staff levels we run the risk of not having compaction in TB 59 ESR, which wouldn't be a good place to be.

Jörg.

BB
Ben Bucksch
Sun, Oct 1, 2017 10:38 PM

Jörg Knobloch wrote on 01.10.17 23:48:

I vote for the fork.

I vote against it.

Please try to fix the bug instead.

You already did most of the investigation work with:

replace the original message file fails with "access denied" since due
to the new processing the file is still locked.

You might just need to close the streams (earlier), or something like that.

I also see some disconcerting messages come from Necko, like: 
WARNING: 'NS_FAILED(rv)', file
c:/mozilla-source/comm-central/mozilla/xpcom/io/SlicedInputStream.cpp,
line 119

The warnings might give additional hints what's going wrong.

Ben

Jörg Knobloch wrote on 01.10.17 23:48: > I vote for the fork. I vote against it. Please try to fix the bug instead. You already did most of the investigation work with: > replace the original message file fails with "access denied" since due > to the new processing the file is still locked. You might just need to close the streams (earlier), or something like that. > I also see some disconcerting messages come from Necko, like:  > WARNING: 'NS_FAILED(rv)', file > c:/mozilla-source/comm-central/mozilla/xpcom/io/SlicedInputStream.cpp, > line 119 The warnings might give additional hints what's going wrong. Ben
JK
Jörg Knobloch
Sun, Oct 1, 2017 11:35 PM

On 01/10/2017 23:48, Jörg Knobloch wrote:

I vote for the fork. However wants to investigate the compaction
failure can simply remove the fork and apply the SlicedInputStream()
patches again.

With current staff levels we run the risk of not having compaction in
TB 59 ESR, which wouldn't be a good place to be.

On 01/10/2017 23:48, Jörg Knobloch wrote: > > I vote for the fork. However wants to investigate the compaction > failure can simply remove the fork and apply the SlicedInputStream() > patches again. > > With current staff levels we run the risk of not having compaction in > TB 59 ESR, which wouldn't be a good place to be. > Patch can be inspected here: https://bugzilla.mozilla.org/show_bug.cgi?id=1404752