Steps to reproduce: 1. login to rhn.webdev.redhat.com 2. click on channels tab 3. under Software Channel Management - click "create new channel" 4. enter channel name, channel label and channel summary, click "Create Channel" button 5. click packages 6. click add packages 7. in the view select "All managed packages" and click view 8. select all the packages that are listed and click "Add Packages" button actual result: 500 Error - Internal Server Error expected result: should be able to add packages to custom channel.
*** Bug 617345 has been marked as a duplicate of this bug. ***
This is very likely caused by race condition between Java and Perl tiers, who all want to insert the same row into rhnSet. In "normal" environments, usually the Java layer processes the AJAX requests (spawned by clicking on the checkboxes) fast enough to have rhnSet populated before user has clicked on the 'Add' button. In that case, Perl tier sees those entries populated and decides not to do any more work on them. However, if Java processing is stuck or simply slow, there is a fair amount of chance that not all AJAX requests will be processed at the time Perl has started the processing of the form submission. In that situation, Perl will see only part of the user selected checkbox values actually inserted into rhnSet table and it will helpfully try to insert the missing values. At the same time, Java is trying to insert the same rows on its own. Most of the time it works without error, given the db and the Java layer is responsive enough.
Fix provided in d12ce181a12c9901163e706f72420548f6d9231c.
And available on WEBDEV.
verified in webdev.
*** Bug 548084 has been marked as a duplicate of this bug. ***
verified in webqa