/srv/irclogs.ubuntu.com/2015/08/20/#launchpad-dev.txt

maozhouWhen I run "cronscripts/process-job-source.py IInitializeDistroSeriesJobSource",  it output deug message "Running <InitializeDistroSeriesJob for distribution: kylin, distroseries: ginkgo, parent[overlay?/pockets/components]: utopic[False/Release/main], architectures: (u'amd64', u'arm64', u'armhf', u'hppa', u'i386'), archindep_archtag: None, packagesets: None, rebuild: True> (ID 2044) in status Waiting".  How to debug it ?07:57
wgrantmaozhou: Debug what?08:00
maozhouwgrant: How to make it  initialize the series ?08:02
wgrantmaozhou: You've said that it said it initialised the series, but nothing further.08:02
wgrantThere's no problem.08:02
maozhouwgrant: But , it's this status for hours08:05
wgrantAh, that is an important piece of information.08:05
wgrantIs it doing anything?08:05
wgrantif your machine is slow that may not be unreasonable.08:05
maozhouNo, my machine is not slow.And  there is no building job now.08:07
maozhouThe build queue is empty08:08
wgrantSeries initialisation does not create builds.08:08
wgrantIs the script still running?08:08
maozhouThe script maintain this status08:09
wgrantI don't understand what you mean.08:10
maozhouhttp://i1.tietuku.com/74d40e72869ead18.png08:15
wgrantSo it is still running, and has been running for several hours?08:15
wgrantIs it issuing database queries?08:15
maozhouYes, it's has ben running for several hours.08:16
maozhouI search  the ID  which belong to the package ,the package has been builded successful.08:18
wgrantThe package?08:19
wgrantIDS does not touch builds.08:19
maozhouThe ID of 2044 , is it the package ID ?08:20
wgrantNo, that's a job ID.08:21
wgrantIDS doesn't touch a single package.08:21
wgrantIt touches an entire series.08:21
wgrantYou should find out from postgres whether it is still actively issuing queries.08:22
maozhouwhich is postgres?08:23
wgrantPostgreSQL, the database that Launchpad uses.08:23
maozhouWhich table can I find the job ID 2044?08:25
wgrantEither Job or DistributionJob, I forget.08:26
maozhouNeed I modify the database manual ?08:28
wgrantNo08:28
wgrantYou need to work out whether the job is actually hung.08:28
wgrantstrace it, look in pg_stat_activity to see if it's running DB queries, etc.08:28
maozhouok, thank you08:30
maozhouwgrant:  In  table pg_stat_activity ,  I find the job is actually hung. How to deal with it?09:08
maozhouhttp://i1.tietuku.com/7bcb98edbf3a5831.png09:08
wgrantThe transaction start time isn't very interesting, but the query start time is.09:08
maozhouI don't understand.09:12
wgrantmaozhou: IDS can use long transactions, that's fine.09:14
wgrantThe question is whether a single query has hung, and if so what that is.09:14
wgrantThose are other columns in pg_stat_activity that you haven't disclosed.09:14
maozhouI only select "datid,datname,pid,usename,Xact_start" from the table "pg_stat_activity"09:20
wgrantThere should also be the query start time and query text.09:20
wgrantThose are interesting.09:20
cjwatsonjust select *, it's not that wide09:21
cjwatsonbetter than messing about09:21
cjwatsonand use a text pastebin rather than pointlessly turning text into an image :-)09:22
maozhouhttp://i3.tietuku.com/e31c6b656b8c47ce.png09:24
maozhouThe output message is like this.09:25
maozhouthe query is "idle in transaction | SELECT BinaryPackageBuild.arch_indep, BinaryPackageBuild.archive, BinaryPackageBuild.build_farm_job, BinaryPackageBuild.builder, BinaryPackageBuild.date_created, BinaryPackageBuild.date_finished, BinaryPackageBuild.date_first_dispatched, BinaryPackageBuild.date_started, BinaryPackageBuild.dependencies, BinaryPackageBuild.distribution, BinaryPackageBuild.distro_arch_series, BinaryPackageBuild.distro_series, Binar09:28
maozhouyPackageBuild.failure_count, BinaryPackageBuild.id, BinaryPackageBuild.is_distro_archive, BinaryPackageBuild.log, BinaryPackageBuild.pocket, BinaryPackageBuild.processor, BinaryPackageBuild.source_package_name, BinaryPackageBuild.source_package_release, BinaryPackageBuild.status, BinaryPackageBuild.upload_log, BinaryPackageBuild.virtualized FROM BinaryPackageBuild WHERE BinaryPackageBuild.archive = 18 AND BinaryPackageBuild.source_package_release09:28
maozhou= 6079 AND BinaryPackageBuild.distro_arch_series = 71 ORDER BY BinaryPackageBuild.id"09:28
cjwatsonThat would appear to be making progress.09:28
maozhouThe query start time is "2015-08-20 15:39:18.258064+08"09:29
cjwatsonquery_start two minutes before you gave the paste URL here, if I have your timezone correct09:29
cjwatsonNo, it's not09:29
cjwatsonThat's the xact_start09:29
cjwatsonquery_start is 2015-08-20 17:22:12.816189+08 (which if you'd used a text pastebin I would have been able to copy and paste rather than having to retype it)09:30
maozhouOh, yes , query start time is  "2015-08-20 17:22:12.816189+08"09:33
maozhouWhy It's idle in transaction?09:44
wgrantBecause it is thinking, most likely.09:45
wgrantHow big is the series you're copying from?09:45
cjwatsonOr waiting for a lock09:46
wgrantNo, idle means no query is in progress.09:46
wgrant(and waiting is false)09:46
cjwatsonoh, true09:47
cjwatson(I blame openssh having eaten my brain)09:47
wgrantHeh09:47
wgrantWhat are you doing to it?09:47
wgrantOr is it conch?09:47
maozhouThis series is derived from Utopic09:52
wgrantYour utopic.09:53
wgrantHow big is your utopic?09:53
maozhouWill it spend long time for that?09:53
maozhou114G09:54
cjwatsonwgrant: 6.9p1 packaging, followed by fixing conch, followed by 7.0p1 packaging09:55
wgrantAha09:55
cjwatsonor hopefully fixing conch, anyway09:55
cjwatsonwhich will then require upgrading twisted, hence my arguing with pip recently09:55
cjwatsonbtw, do you already have a yak-shaving machine factory or do I need to build one?09:56
wgrantAll the yak-shaving machine capacity for the next year is alread spoken for, I'm afraid.09:56
cjwatsondamn.09:57
maozhouOh, it's finished ,thank you.09:59
cjwatsonwgrant: tempted to make an LP-specific fork with https://github.com/msabramo/setuptools-git/pull/1015:02
cjwatson(OK, won't help once we move to git, but would already have saved me the time I spent writing it)15:02
cjwatsonA pip install of LP's dependencies is down to 36 seconds with that plus a wheel cache, which is still a lot slower than buildout's ~5 seconds but maybe now not prohibitively so15:04

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!