Page MenuHomePhabricator

Issues saving binary data to the database
Closed, DuplicatePublic

Description

Author: p.sapiejewski

Description:
Notice: unserialize() [function.unserialize]: Error at offset 0 of 261 bytes in C:\wamp\www\wiki\includes\objectcache\SqlBagOStuff.php on line 381
Call Stack
# Time Memory Function Location
1 0.0016 681360 {main}( ) ..\index.php:0
2 0.1672 11831376 MediaWiki->run( ) ..\index.php:58
3 0.1672 11831376 MediaWiki->main( ) ..\Wiki.php:529
4 0.1672 11831456 MediaWiki->performRequest( ) ..\Wiki.php:622
5 0.2140 15823744 MediaWiki->performAction( ) ..\Wiki.php:237
6 0.2147 15969200 Article->view( ) ..\Wiki.php:466
7 0.3276 22815216 ParserCache->getKey( ) ..\Article.php:534
8 0.3276 22815360 SqlBagOStuff->get( ) ..\ParserCache.php:115
9 0.3283 22816528 SqlBagOStuff->unserialize( ) ..\SqlBagOStuff.php:152
10 0.3283 22817040 unserialize ( ) ..\SqlBagOStuff.php:381

PostgreSQL 9.0
Apache 2.2.17
PHP 5.3.4


Version: 1.20.x
Severity: major
OS: Windows 7
Platform: PC
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=24607

Details

Reference
bz30987
TitleReferenceAuthorSource BranchDest Branch
search: Disable auto versioning in glentrepos/data-engineering/airflow-dags!335ebernhardsonwork/ebernhardson/glent-upload-auto-versionmain
search: Bump glent to 0.3.3repos/data-engineering/airflow-dags!334ebernhardsonwork/ebernhardson/glent-0.3.3main
search: Bump glent jar to 0.3.2repos/data-engineering/airflow-dags!324ebernhardsonwork/ebernhardson/glent-0.3.2main
HivePartitionWriter: Cast values to appropriate typesrepos/search-platform/discolytics!22ebernhardsonwork/ebernhardson/partition-writer-cast-valuesmain
Migrate search_satisfaction DAGrepos/data-engineering/airflow-dags!309pfischermigrate-search-dag-search_satisfactionmain
Migrate glent_weekly DAGrepos/data-engineering/airflow-dags!292pfischermigrate-search-dag-glent_weeklymain
Migrate scripts used by ores_predictions AirFlow DAGrepos/search-platform/discolytics!17pfischermigrate-cli-for-ores_predictions-dagmain
search: Import popularity score from airflow 1repos/data-engineering/airflow-dags!266ebernhardsonwork/ebernhardson/popularity_scoremain
search: Import query clicks from airflow 1repos/data-engineering/airflow-dags!265ebernhardsonwork/ebernhardson/query_clicksmain
search: Port incoming_links from airflow 1repos/data-engineering/airflow-dags!252ebernhardsonwork/ebernhardson/incoming-linksmain
search: Port export_queries_to_relforge from airflow 1repos/data-engineering/airflow-dags!251ebernhardsonwork/ebernhardson/export-queries-to-relforgemain
Port incoming_links from airflow v1repos/search-platform/discolytics!15ebernhardsonwork/ebernhardson/incoming_linksmain
Port export_queries_to_relforgerepos/search-platform/discolytics!12ebernhardsonwork/ebernhardson/export-queries-to-relforgemain
search: Port import_cirrus_indexes from airflow 1repos/data-engineering/airflow-dags!247ebernhardsonwork/ebernhardson/import_cirrus_indexesmain
Port import_cirrus_indexesrepos/search-platform/discolytics!11ebernhardsonwork/ebernhardson/import_cirrus_indexesmain
Port over search drop_old_data_daily dagrepos/data-engineering/airflow-dags!241ebernhardsonwork/ebernhardson/drop-old-data-dailymain
Import refinery-drop-mediawiki-snapshotsrepos/search-platform/discolytics!7ebernhardsonwork/ebernhardson/drop-mediawiki-snapshotsmain
Show related patches Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:51 PM
bzimport set Reference to bz30987.
bzimport added a subscriber: Unknown Object (MLST).

Can you tell us what you were doing when you got this error?

p.sapiejewski wrote:

I have just install wiki through website, copy LocalSettings.php to folder and run Wiki main page. At start I have this error.

p.sapiejewski wrote:

(In reply to comment #2)

I have just install wiki through website, copy LocalSettings.php to folder and
run Wiki main page. At start I have this error.

Earlier I have 1.17 version and there was a hundreds copies of that error. In 1.19 I have only six copies.

Could it be possible you have gzinflate function disabled (but the gzdeflate function enabled) Looking at the code, that would probably do it (although that'd be a weird thing to have). Otherwise it would really help to know what value is being passed to unserialize that's causing the issue.

p.sapiejewski wrote:

This is realy weird but I do nothing and it works today oO'
Yesterday clearing cache gives me nothing but today... eh...
Anyway thank you very much.
If this bug will return I will reopen this case.

Best Regards
Piotr

p.sapiejewski wrote:

Hah, my buddy make me a joke and install wiki on MySQL :/

Sorry for that. Problem isn't solved yet.

zlib is enable as far as I can see.

Values of $serial with errors (I think):

x4bb432b4aa2eb632b7520a730d0af6f4f753b2ceb432b4ae0500

x458dcd0ac2301084df651fa06c421a9bcd513c4a2eea3db64117ec0fdd1e94d27737118ab7e1fb6698408ee018db67ba709f806a5a851a82fe9666e171002f9981aa6c654a5698ddbf5f8821d0a8143a8d68b533f58feabd777a4f3c7fc03335d6201677286e1c96c8838457778e0f6ec1df09f7e1555217a625ff0bf84848ebb67d01

x458dcd0ac2301084df651fa06c421a9bcd513c4a2eea3db64117ec0fdd1e94d27737118ab7e1fb6698408ee018db67ba709f806a5a851a82fe9666e171002f9981aa6c654a5698ddbf5f8821d0a8143a8d68b533f58feabd777a4f3c7fc03335d6201677286e1c96c8838457778e0f6ec1df09f7e1555217a625ff0bf84848ebb67d01

x1dc7410e82301040d13da7686047545a0b41c6c398e9741a9b161a5b0921c6bb4bfc9b975f406905355e16de4ecd6bf5140c66f1ff0fa598323406e5d1b7aaba5610d29345e01dc4bc3f361f3c642e69cdc431a1e50ccec7f7c1ec17eff63395020358a77a2d9d31886a9cf46d9478d5b6ef59921ec84ea2edaafafe03

x9d95cd72db2010c7ef790a0fe921495547f247242befd0538f9ee9ac10b28810b880acba9ebc7b17901579d45caa13fb6381ff7e804c9e64e92a276dbf140a4aa697bc3d0ad632691f4867d05647cb953424aa3a49ddf0e1cbe305dda7934bc3ecc38550da3225590b5c1892c711a1ca0d321c956019c949c92ae884250878552929cedeafe4060ae1174e6dd31d0ecc588f58c92d2eb0379b38a86459082a386d463fc3bc50922737b6929a1f6a3bf195caf2aae55269ef36819a9d1808284b3d812e640ba23902ca0abb7bde83a5b5e0c60e136ec16fcb64394e8c4c4b102ef41be0c308075520e9d9f0433094a6cc2bebda1674c8d501f765e84c3ad948d54b4c43cd4be6a3f00ece3a82d54ae0c60339a00a0cbdd0aa61212fbc755af91facca2a226f9dc138c2012dd8dabbf82dafc9763392f53ec2f9095251a035bb8e953c61a60497cd409c6b01b41943975d5b305d3328b93c84941d31e79cf54a565c0f191b9155472fe95787b52b0003dd4644d312ceb8367543c15b8e8bb6b84a63fbbadd8f604c8f11f8adb4ead17585cb0c03edaae2fd5738656ad56348259314862670e8adc39b8021844a3b12441b5f55943d72abe864ac8417e8ec8663b2c909db0f6b83b6ed0a5b6b4ca0124195ad71cbb10a9dab2c1e395886097e62430ebc3b22ac81a6def032a86610eee788a6151b8060e13ec4d11d197b32246f1d7d10575790379b5d71a1ec3fa8e0dd1c7e74e20d76ad3a83b75de4a75a751aee502fae4572553d81e6e0efff51602e05c84387cd78b54355bf9b98e45677ec032424af40980959cdc87a463633b29d9197194967249b91dd8c24f11ccd552773d9c95c7732179e5c95bf3fbebebe471702025f59024b6ca5e8fe7aa316debee08bad747e5f408cdffb5eeee5f3d3c2dfed45c3cef9a23dffec79c3736c62d5e1eb147e1a79c5053e6539961e5f916fd4987c9b9755b259c755510024e96e9da531acd6e566c362baded272b7787ade4b828250d7e7bf1feb5eac4ffe3e616ef8f9b877f24778dec8d7fd9e0ced34a06902c2917777ff11d99b0b8c6659b14e53bc6615142f459a65db749541fc92eeb22ddd6518d81d79fd0b

x1dc74d0ac2301040e17d4f11da5d519b1f42743c8c4cc70986a60d269612c4bb5b7d9bc7574019052d9e16de0edd730d348d98c5df6f4a3165e846947b9fa6197a41480f1613571073bd6d610a90b9a43513c78477cee0437ced9bc3127c3d522960c16bbc28edac33a8b531967e967ad4f24cceb013fdd0b4d72f

karun.84 wrote:

Not a Postgresql problem, so removed the tracking bug.

overlordq wrote:

Not invalid, reproducable, likely is a problem with sending binary data to Postgres.

overlordq wrote:

  1. Take working wiki
  2. Run maintenance/storage/compressOld.php
  3. Run maintenance/storage/testCompression.php Main_Page
  4. Get errors:

PHP Notice: unserialize(): Error at offset 95 of 158 bytes in /var/www/thedarkcitadel.com/w/includes/HistoryBlob.php on line 265

Notice: unserialize(): Error at offset 95 of 158 bytes in /var/www/thedarkcitadel.com/w/includes/HistoryBlob.php on line 265
PHP Fatal error: Call to a member function uncompress() on a non-object in /var/www/thedarkcitadel.com/w/includes/HistoryBlob.php on line 275

Fatal error: Call to a member function uncompress() on a non-object in /var/www/thedarkcitadel.com/w/includes/HistoryBlob.php on line 275

karun.84 wrote:

(In reply to comment #8)

Not invalid, reproducable, likely is a problem with sending binary data to
Postgres.

The person who filed the bug replied in comment 6 saying they use MySQL and not Postgresql, so it is not a Postgresql problem.

I have this problem, as described in comment 0, on posgresql running MW 1.17 - no issues running same code-base on MySQL.

Obviously, that is an old versions of MW, and issue may be subsequently fixed in more recent versions (I am not currently able to test this), but it is definitely seems to be a postgres-related issue.

To reproduce:

  • Install wiki on PostgreSQL
  • Go to main page
  • Multiple errors, as described in comment 0

Note that memcached is not installed, and $wgMainCacheType = CACHE_NONE.

I would add back the 'postgresql' keyword, but it seems that it doesn't exist any more.

(The postgresql keyword has been replaced with the tracking bug #384.)

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.