RFC: Bug fix releases for 3.3 and beyond

Hi,

I would really like to see the LLVM project start to make official bug fix
releases (e.g. 3.3.1, 3.3.2, etc.). I think that this would be useful for a
lot of the users of LLVM, especially projects that use LLVM as a library.
I am willing to help maintain bug fix releases, and I'm wondering if
this is something that the LLVM project would officially support with
a stable SVN branch and by hosting the official stable tarball releases.

I realize that maintaining stable branches is a lot of work, so I would
like to come up with a procedure that makes maintaining these branches
as easy as possible. Here is a rough idea of what I had in
mind, but please suggest alternatives if you know of a better way:

1. Developer fixes a bug or makes a change that he/she thinks would make
a good candidate for the stable branch. Commits would require approval
from the Code Owner in order to be backported to stable.

2a. When the developer commits that change, he/she adds to the end of the
commit message something like:

Note: This is a candidate for the stable branch

2b. Alternatively, if a user discovers a bug in a stable release that has
been fixed in ToT, he/she could request to have the fix backported.

3. The developer would be encouraged, but not required to cherry-pick the
commit to the stable branch. The stable maintainer would periodically
search the commit logs and cherry-pick any commits that had been missed,
consulting with the author of the commit in the case of a difficult
merge conflict.

4. After some interval of time, the stable maintainer would announce
plans for a stable release and testing would begin.

What does everyone think? Would something like this be doable?

Thanks,
Tom

I would really like to see the LLVM project start to make official bug fix
releases (e.g. 3.3.1, 3.3.2, etc.). I think that this would be useful for a
lot of the users of LLVM, especially projects that use LLVM as a library.
I am willing to help maintain bug fix releases, and I'm wondering if
this is something that the LLVM project would officially support with
a stable SVN branch and by hosting the official stable tarball releases.

This would be really useful, and definitely welcome. The major thing that has historically prevented it from happening is manpower. We have enough difficulty as it is pulling together the official major releases.

However, if someone was interested in being the "update release manager" and was willing to do the work to organize and qualify it, it could definitely happen. Tom, are you personally interested in doing this?

-Chris

Tom Stellard <tom@stellard.net> writes:

I would really like to see the LLVM project start to make official bug fix
releases (e.g. 3.3.1, 3.3.2, etc.). I think that this would be useful for a
lot of the users of LLVM, especially projects that use LLVM as a library.

[snip]

What does everyone think? Would something like this be doable?

As a LLVM library user I considered creating a bug fix branch and
devoted some time to study how it would run. Unlike your proposal, my
premise was to assume zero collaboration from the developers and the
LLVM project infrastructure itself (just to cover the worst case.) It
would run by just monitoring bugzilla and commit notifications in the
mailing lists and cherry picking changes into a git repo hosted in
Github.

The goal was to monotonically increase the quality of the branch. I
concluded that it is doable with about 10 hours/week, although there are
some serious constraints. From the top of my head, in no particular
order:

1. One must assume that the development branch will diverge fast on the
   "hot" areas, which are precisely those were most bugs tend to happen.
   So not all fixes could be imported.

2. The covered platforms might be limited (in my case, just
   x86/Linux/Windows and x86_64/Linux.) Unless you have the necessary
   machines or put too much trust on the bug fix author.

3. There would be cases where you cannot decide if a patch that fixes a
   bug jeopardizes the global quality of the branch, so when in doubt,
   those fixes should be ignored. This could be alleviated somewhat
   asking the opinion of the relevant developers but, as mentioned, I
   didn't count on them.

4. At some point, the development branch would be so far away that it
   would make little sense to keep maintaining the bug fix branch. In
   that regard, the lifetime of the bug fix branch would start with a
   Y.X release and end with a Y.(X+1) release, unless for the cases
   where applying a fix to a previous version would be a no-brainer.

5. There would be no bug fix releases. As mentioned, the bug fix branch
   quality must monotonically grow over time. The idea of a release
   implies "bug fixing the bug fixes", something you can not do unless
   the developers are working with you. And it doesn't make much sense
   when you work on a relatively short period (see point 4.) So in this
   point, it must be stressed that risky bug fixes should be held back
   or incorporated on special branches if they are important enough.

There are other factors/ideas involved, such as semi-automatically
detecting changes that touches areas modified by a previous bug fix (for
examining them in detail), if completely ignoring the areas not
specifically covered by the review process (see point 2), using a
stage-based process where fixes advance on a series of "maturity level"
branches, etc.

> I would really like to see the LLVM project start to make official bug fix
> releases (e.g. 3.3.1, 3.3.2, etc.). I think that this would be useful for a
> lot of the users of LLVM, especially projects that use LLVM as a library.
> I am willing to help maintain bug fix releases, and I'm wondering if
> this is something that the LLVM project would officially support with
> a stable SVN branch and by hosting the official stable tarball releases.

This would be really useful, and definitely welcome. The major thing that has historically prevented it from happening is manpower. We have enough difficulty as it is pulling together the official major releases.

However, if someone was interested in being the "update release manager" and was willing to do the work to organize and qualify it, it could definitely happen. Tom, are you personally interested in doing this?

Yes, I would be willing to be the "update release manager".

-Tom

I like the idea, We do the same for our wbem server, also we have a fixed timeline for the bug fix release.

May be I too can join the wagon

As Chris said, the only thing preventing this is manpower. But if there are people ready and willing to do this, then I don't see it as a Bad Thing.

My first comment is that these should be strictly bug fix releases. So your (1) above wouldn't include changes other than bug fixes. There would need to be a hierarchy for bugs. The reason is that *any* change to the stable branch inherently carries risk. So for instance, a bug that's a crasher, but would affect only a small number of people may not be worthy of inclusion into a dot-release. Etc.

My second comment is that top-of-tree moves very fast. This can make changes hard to back-port to a stable branch that may be months old. You are stuck having to either do it yourself, or begging the original author to back-port the fix. :slight_smile:

How frequently do you expect to do a dot-release? Our major release schedule is roughly every 6 months. Do you think bimonthly would be too many? or would you do it only when enough changes require it?

Finally, there is testing to consider. Obviously, full testing would be too rough on the community; people simply don't have enough time to spend a full month testing a dot-release. What are you thoughts on how testing would proceed?

-bw

Hello folks.

I believe the best policy for maintenance release dates should be driven by the need to fix a
critical bug. If you do a major release and a critical bug is found in the first few weeks, then
a maintenance release should happen in that time frame. Maintenance releases are not scheduled
by the calendar but by the needs of the users relating to known bugs. If you do a little research
on the linux kernel maintenance releases, you'll see a clear pattern, where there are typically
several patch releases in the first month, and the rate of patches exponentially declines rather
quickly. I would expect the same of any complex code base.

enjoy,
Karen

That's a great idea and I would definitely like to participate to this effort.

I am maintaining several out-of-tree backends for Parrot, and this is
essentially what I do : base the backends on the current official release,
apply some upstream bug fixes or upstream bug fixes until I can rebase to the
next release.

Teaming up for this effort would be great for those developing externally to
the tree.

I am not sure if we want to make point releases, and how we can ensure quality
as this requires man power to test all variants. On the other hand,
maintaining a branch with only "safe" (?) patches is definitely useful.

Cheers,

> Hi,
>
> I would really like to see the LLVM project start to make official bug fix
> releases (e.g. 3.3.1, 3.3.2, etc.). I think that this would be useful for a
> lot of the users of LLVM, especially projects that use LLVM as a library.
> I am willing to help maintain bug fix releases, and I'm wondering if
> this is something that the LLVM project would officially support with
> a stable SVN branch and by hosting the official stable tarball releases.
>
> I realize that maintaining stable branches is a lot of work, so I would
> like to come up with a procedure that makes maintaining these branches
> as easy as possible. Here is a rough idea of what I had in
> mind, but please suggest alternatives if you know of a better way:
>
> 1. Developer fixes a bug or makes a change that he/she thinks would make
> a good candidate for the stable branch. Commits would require approval
> from the Code Owner in order to be backported to stable.
>
> 2a. When the developer commits that change, he/she adds to the end of the
> commit message something like:
>
> Note: This is a candidate for the stable branch
>
> 2b. Alternatively, if a user discovers a bug in a stable release that has
> been fixed in ToT, he/she could request to have the fix backported.
>
> 3. The developer would be encouraged, but not required to cherry-pick the
> commit to the stable branch. The stable maintainer would periodically
> search the commit logs and cherry-pick any commits that had been missed,
> consulting with the author of the commit in the case of a difficult
> merge conflict.
>
> 4. After some interval of time, the stable maintainer would announce
> plans for a stable release and testing would begin.
>
> What does everyone think? Would something like this be doable?
>
As Chris said, the only thing preventing this is manpower. But if there are people ready and willing to do this, then I don't see it as a Bad Thing.

My first comment is that these should be strictly bug fix releases. So your (1) above wouldn't include changes other than bug fixes. There would need to be a hierarchy for bugs. The reason is that *any* change to the stable branch inherently carries risk. So for instance, a bug that's a crasher, but would affect only a small number of people may not be worthy of inclusion into a dot-release. Etc.

I was thinking for shared code it would be strictly bug fix only, but
maybe things like additional C API implementations or standalone passes
might be OK too assuming there is interest.

However, for target specific code, I think backend code owners should
have a little more leeway as far as what gets accepted. For the
R600 backend I can see a situation where I may want to backport a new
feature or something else, so it would be nice to have a little more
flexibility and maybe other backend owners would want to have this
option as well.

My second comment is that top-of-tree moves very fast. This can make changes hard to back-port to a stable branch that may be months old. You are stuck having to either do it yourself, or begging the original author to back-port the fix. :slight_smile:

I understand. I think if there is a patch that is too difficult for the
release maintainer to backport he/she should be able to go to the author
and request help. If the author or some other party doesn't care enough
about the fix to help backport it, then it probably isn't important
enough to go to stable.

How frequently do you expect to do a dot-release? Our major release schedule is roughly every 6 months. Do you think bimonthly would be too many? or would you do it only when enough changes require it?

This is hard to say, but probably as required.

Finally, there is testing to consider. Obviously, full testing would be too rough on the community; people simply don't have enough time to spend a full month testing a dot-release. What are you thoughts on how testing would proceed?

What is it about testing for releases that takes a month to complete?
Is it just coordinating with all the interested parties and making sure
they are happy with the state of the code?

-Tom

As Chris said, the only thing preventing this is manpower. But if there are people ready and willing to do this, then I don't see it as a Bad Thing.

My first comment is that these should be strictly bug fix releases. So your (1) above wouldn't include changes other than bug fixes. There would need to be a hierarchy for bugs. The reason is that *any* change to the stable branch inherently carries risk. So for instance, a bug that's a crasher, but would affect only a small number of people may not be worthy of inclusion into a dot-release. Etc.

I was thinking for shared code it would be strictly bug fix only, but
maybe things like additional C API implementations or standalone passes
might be OK too assuming there is interest.

However, for target specific code, I think backend code owners should
have a little more leeway as far as what gets accepted. For the
R600 backend I can see a situation where I may want to backport a new
feature or something else, so it would be nice to have a little more
flexibility and maybe other backend owners would want to have this
option as well.

If we are going to go this route, I would be *very* selective about taking non-bug fixes. Target specific enhancements to our non-"tier 1" platforms ("tier 1" being x86 and ARM) would depend upon that back-end owner's judgement. However for the "tier 1" platforms, I will continue to be very skeptical. Adding new C APIs is challenging, because once we release with a C API it's there forever. Of course, there will be a suitable amount of bake time, etc.

Basically, I will be very skeptical about any changes that will go into a dot-release. The two questions, which I would want answered, are "why is this change important enough to warrant adding it to a new release?" and "how safe is this change?".

My second comment is that top-of-tree moves very fast. This can make changes hard to back-port to a stable branch that may be months old. You are stuck having to either do it yourself, or begging the original author to back-port the fix. :slight_smile:

I understand. I think if there is a patch that is too difficult for the
release maintainer to backport he/she should be able to go to the author
and request help. If the author or some other party doesn't care enough
about the fix to help backport it, then it probably isn't important
enough to go to stable.

Fair enough. (And that's exactly what should happen. :slight_smile: )

How frequently do you expect to do a dot-release? Our major release schedule is roughly every 6 months. Do you think bimonthly would be too many? or would you do it only when enough changes require it?

This is hard to say, but probably as required.

Finally, there is testing to consider. Obviously, full testing would be too rough on the community; people simply don't have enough time to spend a full month testing a dot-release. What are you thoughts on how testing would proceed?

What is it about testing for releases that takes a month to complete?
Is it just coordinating with all the interested parties and making sure
they are happy with the state of the code?

Pretty much. Basically, we allow for a two week test and fix sequence. The testers are given one week to test the newest release candidate. We could give them a shorter amount of time, but that may put too much pressure on our volunteers. (In actuality, most testers are finished quickly.) We post the binaries they build so that the community can test on their software. We then give developers a week to address any issues that came up during the testing phase. This cycle is repeated once (twice if something disastrous comes up in the second cycle).

Two weeks is more or less an arbitrary choice, but one which allows us ample time to make sure that the release is as good as can be.

That said, there are a couple of options that we could consider:

1) Shorten the release schedule for a dot-release.

  - Considering that we are working with a known good base, we could reasonably expect fewer, if any, regressions. So we wouldn't have to worry as much about allocating so much time for fixing bugs. Plus, those who created the bad patch should be able to fix it fairly quickly.

2) Don't test quite as much, and tag the dot-release as "beta" or some other weasel wordy thing.

  - I'm not a big fan of this (even though I proposed it). I want external developers to be confident with the releases we send out.

I'm sure there are other choices here. But I think that the greatest hurdle we will come across is finding the resources to do the testing.

-bw

For the record, I'm not opposed to this. I'm mostly playing devil's advocate. But I do feel that these are issues that need to be thought out before we continue.

-bw

Like Bill said, would prefer if we take only bug fixes excluding the enhancement/feature change,

Developer who fixes the bug are most likely the best person to back port it to a release branch.

How do we decide when to release bug fix release? is it by the number of bug fixes or user request or fixed time?

Hi Tom,

This is a great idea, we have ourselves back-ported fixes from trunk in LLVM 3.2 we are using.
For stable release is it reasonable to count on a new BUG-fix release every two months for instance ?

Seb

Hi Sebastian,

every 2 months if we have atleast some number(decided) of fixes?

Releasing a bug fix release with one/two fixes seems to be not worth the product release testing.

The largest barrier that I see, which nobody seems to have mentioned, is
the community culture. I think it is awesome that you are willing to put
time into this (and I see at least one other would be too!), but in one way
or another your proposal has an impact on *every* developer of the project,
either

(2a) Through the developer having to reflect before each commit and make
the risk/benefit evaluation for whether it is viable for the stable branch
or
(2b) Being willing to put in some nontrivial amount of time to backport (at
least one ~full rebuild, since they will at least have to check out and
build the tip of the stable branch in order to backport).

Do you think the community will be willing to take on this burden? It seems
like a bit of a culture shift, and one that is not very aligned with out
"don't look backwards" mantra that fuels our backward compatibility policy.
Are there other things we could request from every developer that would be
a better use of their time than a stable branch? e.g. would that time be
better spent documenting or writing tests? That's not so far-fetched:
consider a community culture shift where in response to mailing list
threads ("user requests", quite similar to 2b) developers were encouraged
to document their answer. Would that be a better use of time? Or to
consciously reflect before each commit "does this require adding new
documentation?" (similar to 2a)

Also, it's not clear that we have the infrastructure to test these dot
releases on all our supported platforms. IMHO, without that, it's hard to
have much confidence in the dot release, and I wouldn't want to put out
"LLVM 3.2.1, tested on Linux only".

-- Sean Silva

Sean Silva <silvas@purdue.edu> writes:

The largest barrier that I see, which nobody seems to have mentioned, is
the community culture.

[snip]

Well, the plan I described assumed "zero collaboration from the
developers" for exactly the reasons you mentioned.

IMO it is possible to bring a "maintenance branch" which is preferable
to the development branch for those LLVM users searching for stability,
without disturbing current development process. After all, you only need
to make it a more attractive option than jumping into ToT tracking.

Also, it's not clear that we have the infrastructure to test these dot
releases on all our supported platforms. IMHO, without that, it's hard to
have much confidence in the dot release, and I wouldn't want to put out
"LLVM 3.2.1, tested on Linux only".

If you cover a large fraction of the users, why not?

Sean Silva <silvas@purdue.edu> writes:

> The largest barrier that I see, which nobody seems to have mentioned, is
> the community culture.
[snip]

Well, the plan I described assumed "zero collaboration from the
developers" for exactly the reasons you mentioned.

Indeed. I was just trying to bring it up as an explicit issue rather than
assuming a priori that it was insurmountable.

IMO it is possible to bring a "maintenance branch" which is preferable
to the development branch for those LLVM users searching for stability,
without disturbing current development process. After all, you only need
to make it a more attractive option than jumping into ToT tracking.

I'm not sure how difficult it actually is to follow ToT compared to one
huge pain when upgrading for our full releases. I think it would be
valuable to obtain feedback from projects that rely on LLVM as to how they
go about integrating LLVM into their project and how our releases (and
potentially dot-releases) would integrate into their development process.

I believe that the way that the Rust language is doing things is to keep a
separate fork of LLVM on github, where they put in the patches to work
around bugs that they find. Their main repository then keeps this LLVM fork
pinned on particular commits ofthe fork (using git's submodule
functionality). This has the benefit that they can easily cherry-pick
patches onto their fork whenever they want (or backport, if necessary).
They can then merge in major releases at their leisure, and I believe that
git is smart enough to recognize the cherry-picked patches and merge with
no hassles.
If multiple projects were to adopt this kind of "structured" approach to
depending on LLVM, I think that what is effectively a "stable branch" could
be achieved with just a tiny bit of coordination and sharing. Each project
fixes the issues that immediately affect them and share their
cherry-picking/backporting with other interested projects. This would
require minimal manpower from within the LLVM project proper (possibly just
one person in contact with the various dependent projects to make sure that
everyone is on the same page; a sort of "ambassador") and we would know
that the branch is fixing real issues that have come up in practice with no
effort wasted cherry-picking/backporting patches for a "theoretical"
stability gain.

i.e., we could empower our users to contribute the effort that they are
*already* putting into cherry-picking/backporting to maintain a "stable
community branch" for us.

> Also, it's not clear that we have the infrastructure to test these dot
> releases on all our supported platforms. IMHO, without that, it's hard to
> have much confidence in the dot release, and I wouldn't want to put out
> "LLVM 3.2.1, tested on Linux only".

If you cover a large fraction of the users, why not?

I think that for a "personal" stable branch it would be an appropriate
policy.

However, for an "official LLVM-endorsed and supported" stable branch, such
a policy could potentially alienate the 1-"large fraction" of the users
that you don't cover, and those are exactly the users that we *need* in
order to help LLVM support their platforms better. This is a general social
phenomenon: larger and more-public organizational units need to be more
careful to ensure that they are not perceived as alienating or
discriminating. E.g. if you are serving dinner to close friends, nobody is
going to blame you for not having e.g. a vegetarian or gluten-free option.
But you can be sure that if the White House holds a dinner, they are going
to ensure that they have a vegetarian or gluten-free option.

So it might make sense for the a "stable branch" to be initially an
independent effort by a group of interested individuals who are willing to
put the time into maintaining it, rather than immediately an "official"
stable branch as in Tom's proposal. This will allow building out
infrastructure and automation for the stable release process and platform
support. For example, coming up with a clear procedure for making a
platform one of the tested platforms for the stable release (ideally, it
should be as simple as donating a machine running that platform and keeping
an eye on it).
If this effort shows that a stable branch delivers real value to our users,
for example if some linux distribution decides that it is sufficiently
valuable to package the stable dot-releases, or we receive lots of positive
feedback from our users who are using the stable branches, then it should
be straightforward to brand it with an official LLVM sticker.

-- Sean Silva

In FreeBSD, we ship the release with our release builds and periodically pull in head snapshots from time to time into head. We occasionally cherry-pick fixes if they address problems that have been encountered by us, and we have some out-of-tree changes (although we're trying to minimise that).

In another project, we end up with big tangles of #ifdefs to work around API changes (some of which are for useful improvements, many of which are just gratuitous churn, but that's another story) and try to track ToT where possible, because it minimises the headaches when a new release is branched. In theory, we have working code for the new release, and we can just delete #ifdef branches when we drop support for another branch.

David

Thanks, this is useful to know. I have been wanting to write some
documentation about various "established patterns" of effectively
integrating LLVM into long-lived projects, as guidance for prospective
users. Would you say that these patterns effectively cope with LLVM's
idiosyncrasies? Or do you feel that they are inadequate and are actively
looking for a "better way"?

So my impression from your description is that dot-releases would not be of
much immediate use to your development process?

-- Sean Silva

>>
>> As Chris said, the only thing preventing this is manpower. But if there are people ready and willing to do this, then I don't see it as a Bad Thing.
>>
>> My first comment is that these should be strictly bug fix releases. So your (1) above wouldn't include changes other than bug fixes. There would need to be a hierarchy for bugs. The reason is that *any* change to the stable branch inherently carries risk. So for instance, a bug that's a crasher, but would affect only a small number of people may not be worthy of inclusion into a dot-release. Etc.
>>
>
> I was thinking for shared code it would be strictly bug fix only, but
> maybe things like additional C API implementations or standalone passes
> might be OK too assuming there is interest.
>
> However, for target specific code, I think backend code owners should
> have a little more leeway as far as what gets accepted. For the
> R600 backend I can see a situation where I may want to backport a new
> feature or something else, so it would be nice to have a little more
> flexibility and maybe other backend owners would want to have this
> option as well.

If we are going to go this route, I would be *very* selective about taking non-bug fixes. Target specific enhancements to our non-"tier 1" platforms ("tier 1" being x86 and ARM) would depend upon that back-end owner's judgement. However for the "tier 1" platforms, I will continue to be very skeptical. Adding new C APIs is challenging, because once we release with a C API it's there forever. Of course, there will be a suitable amount of bake time, etc.

Basically, I will be very skeptical about any changes that will go into a dot-release. The two questions, which I would want answered, are "why is this change important enough to warrant adding it to a new release?" and "how safe is this change?".

OK, I think having a more strict policy for "tier 1" platforms makes
sense. For the C API, I was assuming that functions would only be added
to dot-releases that were also added to ToT, however it's fine with
me if anyone wants to exclude these changes from dot-releases, I was just
throwing that out there as an example of a non-bug fix change that might
be wanted in a dot-release.

>> My second comment is that top-of-tree moves very fast. This can make changes hard to back-port to a stable branch that may be months old. You are stuck having to either do it yourself, or begging the original author to back-port the fix. :slight_smile:
>
> I understand. I think if there is a patch that is too difficult for the
> release maintainer to backport he/she should be able to go to the author
> and request help. If the author or some other party doesn't care enough
> about the fix to help backport it, then it probably isn't important
> enough to go to stable.
>
Fair enough. (And that's exactly what should happen. :slight_smile: )

>> How frequently do you expect to do a dot-release? Our major release schedule is roughly every 6 months. Do you think bimonthly would be too many? or would you do it only when enough changes require it?
>
> This is hard to say, but probably as required.
>
>> Finally, there is testing to consider. Obviously, full testing would be too rough on the community; people simply don't have enough time to spend a full month testing a dot-release. What are you thoughts on how testing would proceed?
>
> What is it about testing for releases that takes a month to complete?
> Is it just coordinating with all the interested parties and making sure
> they are happy with the state of the code?
>
Pretty much. Basically, we allow for a two week test and fix sequence. The testers are given one week to test the newest release candidate. We could give them a shorter amount of time, but that may put too much pressure on our volunteers. (In actuality, most testers are finished quickly.) We post the binaries they build so that the community can test on their software. We then give developers a week to address any issues that came up during the testing phase. This cycle is repeated once (twice if something disastrous comes up in the second cycle).

Two weeks is more or less an arbitrary choice, but one which allows us ample time to make sure that the release is as good as can be.

That said, there are a couple of options that we could consider:

1) Shorten the release schedule for a dot-release.

  - Considering that we are working with a known good base, we could reasonably expect fewer, if any, regressions. So we wouldn't have to worry as much about allocating so much time for fixing bugs. Plus, those who created the bad patch should be able to fix it fairly quickly.

I think allowing one week for testing for dot-release would be fine,
though we might be able to shorten it if we could keep track of which
groups wanted to test the dot-release and have them report back when
they're done.

The work required to fix regressions should be much less for a
dot-release than a standard release, and I think it might be better
to shorten then time developers have to fix bugs rather than the time
for testing. This could be done by overlapping the testing and bug fix
periods and also by having a policy of reverting commits that regress a
dot-release if they aren't fixed by the end of the bug fix period.

-Tom